forked from Cargill/pipewrench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tables.yml
193 lines (193 loc) · 6.69 KB
/
tables.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
---
name: "sqoop_to_parquet_import" # The name of this configuration
user_name: {{ source_db_user_name }} # Source database user name
type_mapping: type-mapping.yml # Type mapping used for database type conversion
sqoop_export_dir: {{ hdfs_basedir }}/export # Sqoop export data HDFS path
sqoop_password_file: {{ password_file}} # Password file for sqoop. Must reside in HDFS
sqoop_password: {{ password }} # Password for sqoop. Must reside in HDFS
connection_manager: "org.apache.sqoop.manager.MySQLManager" # Connection manager fully qualified class
sqoop_job_name_suffix: test # Suffix added to sqoop jobs. Can be used to differentiate environments
impala_cmd: "{{ impala_cmd }}"
source_database:
name: "integration_test" # Source database name
connection_string: {{ connection_string }} # Source database connection string. Should be kept in 'env.yml'
cmd: "mysql -P 3306 -upipewrench -ppipewrench -h mysql <"
staging_database:
name: "{{ destination_database }}" # Staging database name.
path: "{{ hdfs_basedir }}/pipewrench" # Staging database HDFS path
result_database:
name: "{{ destination_database }}" # Result database
path: "{{ hdfs_basedir }}/pipewrench" # Result database HDFS path
tables:
- id: "titanic" # Uniquely identifies this table
comment: "Titanic passenager list"
source:
name: "titanic" # Source table name
file: ../../../../../data/Titanic.csv
destination:
name: "titanic" # Destination (Impala) table name
split_by_column: "Id" # Sqoop split by column (--split-by)
kudu:
hash_by: # List of columns to hash by
- Id
num_partitions: 2 # Number of Kudu partitions to create
check_column: Id # Incrementing timestamp of numeric column used when incrementally pulling data (sqoop --check-column)
primary_keys: # List of primary keys
- Id
columns:
- name: "Id" # Column name in source table
datatype: "int" # Column datatype in source table
comment: "comment" # Column comment
- name: "LastName"
datatype: "text"
comment: "comment"
- name: "FirstName"
datatype: "text"
comment: "comment"
- name: "PClass"
datatype: "text"
comment: "comment"
- name: "Age"
datatype: "int"
comment: "comment"
- name: "Sex"
datatype: "text"
comment: "comment"
- name: "Survived"
datatype: "int"
comment: "comment"
- name: "SexCode"
datatype: "int"
comment: "comment"
metadata: # Metadata key values added to tblproperties in table DDL
CONTACT_INFO: "[email protected]" # Contact info will be loaded into tblproperties
LOAD_FREQUENCY: "STREAMING" # Load frequency will be loaded into tblproperties
SECURITY_CLASSIFICATION: "OPEN" # Security classification will be loaded into tblproperties
SOURCE: "upstream.source.location" # Source will be loaded into tblproperties
- id: "vocab" # Uniquely identifies this table
comment: "Vocab table"
source:
name: "vocab" # Source table name
file: ../../../../../data/Vocab.csv
destination:
name: "vocab" # Destination (Impala) table name
split_by_column: "Id" # Sqoop split by column (--split-by)
kudu:
hash_by: # List of columns to hash by
- id
num_partitions: 2 # Number of Kudu partitions to create
check_column: Id # Incrementing timestamp of numeric column used when incrementally pulling data (sqoop --check-column)
primary_keys: # List of primary keys
- id
- year
- sex
- education
- vocabulary
columns:
- name: "Id" # Column name in source table
datatype: "int" # Column datatype in source table
comment: "comment" # Column comment
- name: "Year"
datatype: "int"
comment: "comment"
- name: "Sex"
datatype: "text"
comment: "comment"
- name: "Education"
datatype: "int"
comment: "comment"
- name: "Vocabulary"
datatype: "int"
comment: "comment"
metadata:
CONTACT_INFO: "[email protected]" # Contact info will be loaded into tblproperties
LOAD_FREQUENCY: "STREAMING" # Load frequency will be loaded into tblproperties
SECURITY_CLASSIFICATION: "OPEN" # Security classification will be loaded into tblproperties
SOURCE: "upstream.source.location" # Source will be loaded into tblproperties
- id: "baseball" # Uniquely identifies this table
comment: "Baseball statistics"
source:
name: "baseball" # Source table name
file: ../../../../../data/Baseball.csv
destination:
name: "baseball" # Destination (Impala) table name
split_by_column: "Id" # Sqoop split by column (--split-by)
kudu:
hash_by: # List of columns to hash by
- Id
num_partitions: 2 # Number of Kudu partitions to create
check_column: Id # Incrementing timestamp of numeric column used when incrementally pulling data (sqoop --check-column)
primary_keys: # List of primary keys
- Id
- playerid
- year
columns:
- name: "Id" # Column name in source table
datatype: "int" # Column datatype in source table
comment: "comment" # Column comment
- name: "PlayerId"
datatype: "text"
comment: "comment"
- name: "Year"
datatype: "int"
comment: "comment"
- name: "Stint"
datatype: "int"
comment: "comment"
- name: "Team"
datatype: "text"
comment: "comment"
- name: "LG"
datatype: "int"
comment: "comment"
- name: "G"
datatype: "int"
comment: "comment"
- name: "AB"
datatype: "int"
comment: "comment"
- name: "R"
datatype: "int"
comment: "comment"
- name: "H"
datatype: "int"
comment: "comment"
- name: "X2b"
datatype: "int"
comment: "comment"
- name: "X3b"
datatype: "int"
comment: "comment"
- name: "HR"
datatype: "int"
comment: "comment"
- name: "RBI"
datatype: "int"
comment: "comment"
- name: "SB"
datatype: "int"
comment: "comment"
- name: "CS"
datatype: "int"
comment: "comment"
- name: "BB"
datatype: "int"
comment: "comment"
- name: "SO"
datatype: "int"
comment: "comment"
- name: "IBB"
datatype: "int"
comment: "comment"
- name: "HBP"
datatype: "int"
comment: "comment"
- name: "SH"
datatype: "int"
comment: "comment"
- name: "SF"
datatype: "int"
comment: "comment"
- name: "GIDP"
datatype: "int"
comment: "comment"