mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
feat: add replace option to hive csv upload (#9764)
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
from unittest import mock
|
||||
|
||||
from superset.db_engine_specs.hive import HiveEngineSpec
|
||||
from superset.exceptions import SupersetException
|
||||
from superset.sql_parse import Table
|
||||
from tests.db_engine_specs.base_tests import DbEngineSpecTestCase
|
||||
|
||||
|
||||
@@ -162,3 +164,14 @@ class HiveTests(DbEngineSpecTestCase):
|
||||
HiveEngineSpec.convert_dttm("TIMESTAMP", dttm),
|
||||
"CAST('2019-01-02 03:04:05.678900' AS TIMESTAMP)",
|
||||
)
|
||||
|
||||
def test_create_table_from_csv_append(self) -> None:
|
||||
self.assertRaises(
|
||||
SupersetException,
|
||||
HiveEngineSpec.create_table_from_csv,
|
||||
"foo.csv",
|
||||
Table("foobar"),
|
||||
None,
|
||||
{},
|
||||
{"if_exists": "append"},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user