Browse Source

HUE-8208 [importer] Add test to create a Kudu table manually

Romain Rigaux 7 years ago
parent
commit
158207b260

+ 6 - 0
desktop/libs/indexer/src/indexer/api3.py

@@ -502,6 +502,12 @@ def _envelope_job(request, file_format, collection_name, start_time=None, lib_pa
       }
 
     if file_format['outputFormat'] == 'table':
+      if file_format['isTargetExisting']:
+        # Todo: check if format matches
+        pass
+      else:
+        sql = SQLIndexer(user=request.user, fs=request.fs).create_table_from_a_file(source, destination).get_str()
+        pass
       properties["output_table"] = "impala::%s" % collection_name
       properties["kudu_master"] = manager.get_kudu_master()
     elif file_format['inputFormat'] == 'file':

File diff suppressed because it is too large
+ 4 - 0
desktop/libs/indexer/src/indexer/indexers/sql_tests.py


+ 2 - 0
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -1587,10 +1587,12 @@ ${ assist.assistPanel() }
       self.kafkaFieldNames = ko.observable('');
       self.kafkaFieldNames.subscribe(function(newValue) {
         $.totalStorage('pai' + '_kafka_topics_' + self.kafkaSelectedTopics() + '_kafkaFieldNames', newValue);
+        viewModel.createWizard.guessFieldTypes();
       });
       self.kafkaFieldTypes = ko.observable('');
       self.kafkaFieldTypes.subscribe(function(newValue) {
         $.totalStorage('pai' + '_kafka_topics_' + self.kafkaSelectedTopics() + '_kafkaFieldTypes', newValue)
+        viewModel.createWizard.guessFieldTypes();
       });
       self.kafkaFieldSchemaPath = ko.observable('');
 

Some files were not shown because too many files changed in this diff