trinamo 0.3.1 → 0.3.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43126b906d5b2f56562c3fa82ac4bc3e1ccd5f03
|
4
|
+
data.tar.gz: efb501f1be013df0807d42baa860ebc7180a064f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 193b298c7f4cf4a99ae5f31a56a80e76b24b732d3c63a5aef5358c2578add7cd2fe02df2779af3a33a57e4a31cfb31040696fe769c72e89b8f6cdbf1f3c1b442
|
7
|
+
data.tar.gz: 0b33d8b4fcfabdb0b4e9ec7c1690faa2e2b1aed0e46c790a24fac641d74231bac76911fe2cbfba4aaaa553b8126472a9e1c191225542d1daa8ce0a3b5d762ebb
|
data/lib/trinamo/converter.rb
CHANGED
@@ -6,8 +6,8 @@ module Trinamo
|
|
6
6
|
ddl_body = @ddl[:tables].map do |h|
|
7
7
|
fields = ([h[:hash_key]] + [h[:range_key]] + [h[:attributes]]).flatten.compact
|
8
8
|
<<-DDL.unindent
|
9
|
-
-- #{h[:name]}_ddb
|
10
|
-
CREATE EXTERNAL TABLE #{h[:name]}_ddb (
|
9
|
+
-- #{Trinamo::Converter.remove_head_underscore(h[:name])}_ddb
|
10
|
+
CREATE EXTERNAL TABLE #{Trinamo::Converter.remove_head_underscore(h[:name])}_ddb (
|
11
11
|
#{fields.map { |attr| "#{attr[:name]} #{attr[:type].upcase}" }.join(',')}
|
12
12
|
)
|
13
13
|
STORED BY 'org.apache.hadoop.hive.dynamodb.DynamoDBStorageHandler'
|
@@ -6,8 +6,8 @@ module Trinamo
|
|
6
6
|
ddl_body = @ddl[:tables].map do |h|
|
7
7
|
fields = ([h[:hash_key]] + [h[:range_key]] + [h[:attributes]]).flatten.compact
|
8
8
|
<<-DDL.unindent
|
9
|
-
-- #{h[:name]}_hdfs
|
10
|
-
CREATE TABLE #{h[:name]}_hdfs (
|
9
|
+
-- #{Trinamo::Converter.remove_head_underscore(h[:name])}_hdfs
|
10
|
+
CREATE TABLE #{Trinamo::Converter.remove_head_underscore(h[:name])}_hdfs (
|
11
11
|
#{fields.map { |attr| "#{attr[:name]} #{attr[:type].upcase}" }.join(',')}
|
12
12
|
);
|
13
13
|
DDL
|
@@ -9,14 +9,14 @@ module Trinamo
|
|
9
9
|
partitioned_by = h[:s3_partition] ? "PARTITIONED BY (#{h[:s3_partition].map { |attr| "#{attr[:name]} #{attr[:type].upcase}" }.join(',')})" : ''
|
10
10
|
<<-DDL.unindent
|
11
11
|
-- #{h[:name]}_s3
|
12
|
-
CREATE EXTERNAL TABLE #{h[:name]}_s3 (
|
12
|
+
CREATE EXTERNAL TABLE #{Trinamo::Converter.remove_head_underscore(h[:name])}_s3 (
|
13
13
|
#{fields.map { |attr| "#{attr[:name]} #{attr[:type].upcase}" }.join(',')}
|
14
14
|
) #{partitioned_by}
|
15
15
|
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\\t' LINES TERMINATED BY '\\n'
|
16
16
|
LOCATION '#{h[:s3_location]}';
|
17
17
|
DDL
|
18
18
|
else
|
19
|
-
STDERR.puts "[ERROR] The location of #{h[:name]}_s3 is not found"
|
19
|
+
STDERR.puts "[ERROR] The location of #{Trinamo::Converter.remove_head_underscore(h[:name])}_s3 is not found"
|
20
20
|
nil
|
21
21
|
end
|
22
22
|
end
|
data/lib/trinamo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trinamo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cignoir
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|