schema-inference 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/lib/schema/inference/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87db62e086b2960cdd977b7fabf4bec2ed76208c
|
4
|
+
data.tar.gz: 5608adcf41da8f8f4dff6e5a5cc6a14bc0f0ef86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c8610b4386a6519a3356d2c2364ccf3f29052a76ed664466955f026eb255af8a3525ad26eadc553732e0f686a38b97d2626440d2e2bccfe1818e8e59572f7cd
|
7
|
+
data.tar.gz: 51e065edbe235b0224e3ed32d362b4d1f7bb5f7d8dc8e21afa620ed291690249cb3a4b2e32e9bfff663f1789c49a8ea5a0b24476a6029a5fce7456172d31253f
|
data/README.md
CHANGED
@@ -23,9 +23,9 @@ Or install it yourself as:
|
|
23
23
|
|
24
24
|
## Usage
|
25
25
|
|
26
|
-
|
26
|
+
- Report information on nested data structure
|
27
27
|
|
28
|
-
```
|
28
|
+
```ruby
|
29
29
|
schema = Schema::Inference.schema(dataset: [
|
30
30
|
{
|
31
31
|
'person' => {
|
@@ -55,9 +55,9 @@ schema['person.weight'][:type] # Numeric (inferred to be numeric, even though an
|
|
55
55
|
schema['updated_at'][:type] # Time
|
56
56
|
```
|
57
57
|
|
58
|
-
|
58
|
+
- Recover types from string serialization
|
59
59
|
|
60
|
-
```
|
60
|
+
```ruby
|
61
61
|
schema = Schema::Inference.schema(dataset: {
|
62
62
|
'serialized_time' => '2016-01-01T00:00:00Z',
|
63
63
|
'serialized_integer' => '100',
|
@@ -70,9 +70,9 @@ schema['serialized_numeric'][:type] # Numeric
|
|
70
70
|
schema['serialized_boolean'][:type] # Boolean
|
71
71
|
```
|
72
72
|
|
73
|
-
|
74
|
-
```
|
75
|
-
schema = Schema::Inference.schema(batch_count: 10) do |idx
|
73
|
+
- If you need to load a lot of data consider using the following pattern:
|
74
|
+
```ruby
|
75
|
+
schema = Schema::Inference.schema(batch_count: 10) do |idx|
|
76
76
|
# Pull and return some large amount of data.
|
77
77
|
# Fetching/accessing the data here would avoid the IPC cost of
|
78
78
|
# sending the data to the child process for parallel processing.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema-inference
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eurico Doirado
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|