ibis.impala.api.ImpalaClient.create_table

ImpalaClient.create_table(table_name, obj=None, schema=None, database=None, external=False, force=False, format='parquet', location=None, partition=None, like_parquet=None)

Create a new table in Impala using an Ibis table expression. This is currently designed for tables whose data is stored in HDFS (or eventually other filesystems).

Parameters
table_namestring
objTableExpr or pandas.DataFrame, optional

If passed, creates table from select statement results

schemaibis.Schema, optional

Mutually exclusive with expr, creates an empty table with a particular schema

databasestring, default None (optional)
forceboolean, default False

Do not create table if table with indicated name already exists

externalboolean, default False

Create an external table; Impala will not delete the underlying data when the table is dropped

format{‘parquet’}
locationstring, default None

Specify the directory location where Impala reads and writes files for the table

partitionlist of strings

Must pass a schema to use this. Cannot partition from an expression (create-table-as-select)

like_parquetstring (HDFS path), optional

Can specify in lieu of a schema

Examples

>>> con.create_table('new_table_name', table_expr)  # doctest: +SKIP