[metastore] Automatically prompt for partition when using Kudu format
@@ -438,6 +438,10 @@ ${ assist.assistPanel() }
<input type="checkbox" data-bind="checked: importData, disable: ! useDefaultLocation() && $parent.createWizard.source.path() == nonDefaultLocation();"> ${_('Import data')}
</label>
+ <label class="checkbox">
+ <input type="checkbox" data-bind="checked: hasHeader"> ${_('Use first row has header')}
+ </label>
+
<label class="checkbox">
<input type="checkbox" data-bind="checked: useCustomDelimiters"> ${_('Custom char delimiters')}
</label>
@@ -471,10 +475,6 @@ ${ assist.assistPanel() }
</label>
</div>
- <label class="checkbox">
- <input type="checkbox" data-bind="checked: hasHeader"> ${_('Use first row has header')}
- </label>
-
<label class="control-label"><div>${ _('Partitions') }</div>
<!-- ko if: tableFormat() != 'kudu' -->
@@ -1217,6 +1217,11 @@ ${ assist.assistPanel() }
return self.outputFormat() == 'table' && self.name().indexOf('.') > 0 ? self.name().split('.', 2)[0] : 'default';
});
self.tableFormat = ko.observable('text');
+ self.tableFormat.subscribe(function(newVal) {
+ if (newVal == 'kudu' && self.kuduPartitionColumns().length == 0) {
+ self.kuduPartitionColumns.push(ko.mapping.fromJS({columns: [], range_partitions: [], name: 'HASH', int_val: 16}));
+ }
+ });
self.tableFormats = ko.observableArray([
{'value': 'text', 'name': 'Text'},
{'value': 'parquet', 'name': 'Parquet'},
