|
@@ -84,15 +84,15 @@ EXTERNAL \
|
|
|
% endif
|
|
% endif
|
|
|
TABLE ${ '`%s`.`%s`' % (database, table["name"]) | n }
|
|
TABLE ${ '`%s`.`%s`' % (database, table["name"]) | n }
|
|
|
${ column_list(table, columns) | n } \
|
|
${ column_list(table, columns) | n } \
|
|
|
-% if partition_columns and table.get('file_format') != 'kudu':
|
|
|
|
|
-PARTITIONED BY ${ column_list(table, partition_columns) | n }
|
|
|
|
|
-% endif
|
|
|
|
|
% if kudu_partition_columns and table.get('file_format') == 'kudu':
|
|
% if kudu_partition_columns and table.get('file_format') == 'kudu':
|
|
|
PARTITION BY ${ ', '.join([kudu_partition(partition) for partition in kudu_partition_columns]) | n }
|
|
PARTITION BY ${ ', '.join([kudu_partition(partition) for partition in kudu_partition_columns]) | n }
|
|
|
% endif
|
|
% endif
|
|
|
% if table["comment"]:
|
|
% if table["comment"]:
|
|
|
COMMENT "${table["comment"] | n }"
|
|
COMMENT "${table["comment"] | n }"
|
|
|
% endif
|
|
% endif
|
|
|
|
|
+% if partition_columns and table.get('file_format') != 'kudu':
|
|
|
|
|
+PARTITIONED BY ${ column_list(table, partition_columns) | n }
|
|
|
|
|
+% endif
|
|
|
## TODO: CLUSTERED BY here
|
|
## TODO: CLUSTERED BY here
|
|
|
## TODO: SORTED BY...INTO...BUCKETS here
|
|
## TODO: SORTED BY...INTO...BUCKETS here
|
|
|
% if table.get('row_format'):
|
|
% if table.get('row_format'):
|