Importing tables as datasets#
The “import tables as datasets” feature is available through the API, both for Hive and SQL tables
Importing SQL tables#
project = client.get_project("MYPROJECT")
import_definition = project.init_tables_import()
import_definition.add_sql_table("my_sql_connection", "schema_of_the_table", "name_of_the_table")
prepared_import = import_definition.prepare()
future = prepared_import.execute()
import_result = future.wait_for_result()
Importing Hive tables#
project = client.get_project("MYPROJECT")
import_definition = project.init_tables_import()
import_definition.add_hive_table("hive_database", "hive_table_name")
prepared_import = import_definition.prepare()
future = prepared_import.execute()
import_result = future.wait_for_result()
Reference documentation#
Temporary structure holding the list of tables to import |
|
Result of preparing a tables import. |