فهرست منبع

HUE-7 [importer] Disable loading data in S3 tables

Romain Rigaux 8 سال پیش
والد
کامیت
b8e0fead07
2فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 1 1
      desktop/libs/indexer/src/indexer/file_format.py
  2. 6 0
      desktop/libs/indexer/src/indexer/templates/importer.mako

+ 1 - 1
desktop/libs/indexer/src/indexer/file_format.py

@@ -332,7 +332,7 @@ class CSVFormat(FileFormat):
   @classmethod
   def _guess_from_file_stream(cls, file_stream):
     sample = cls._get_sample(file_stream)
-    
+
     try:
       dialect, has_header = cls._guess_dialect(sample)
       delimiter = dialect.delimiter

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

@@ -1110,6 +1110,12 @@ ${ assist.assistPanel() }
         }
         resizeElements();
       });
+      self.isObjectStore = ko.computed(function() {
+        return self.inputFormat() == 'file' && /^s3a:\/\/.*$/.test(self.path());
+      });
+      self.isObjectStore.subscribe(function(newVal) {console.log(newVal);
+        vm.createWizard.destination.useDefaultLocation(! newVal);
+      });
 
       // Table
       self.table = ko.observable('');