DataFrame create_table Function Usage
create_table is used to create a table in DataArts Fabric. The function signature is as follows:
def create_table( self, name: str, obj: Optional[Union[ir.Table, pd.DataFrame, pa.Table, pl.DataFrame, pl.LazyFrame]] = None, *, schema: Optional[ibis.Schema] = None, database: Optional[str] = None, temp: bool = False, external: bool = False, overwrite: bool = False, partition_by: Optional[ibis.Schema] = None, table_properties: Optional[dict] = None, store: Optional[str] = None, location: Optional[str] = None )
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
name |
str |
Yes |
Name of the table to be created. |
obj |
ir.Table|pd.DataFrame|pa.Table|pl.DataFrame|pl.LazyFrame |
No |
Data used to fill in the table. At least one of obj or schema must be specified (currently, inserting data while creating a table is not supported). |
schema |
sch.SchemaLike |
No |
Schema of the table to be created. At least one of obj or schema must be specified. |
database |
str |
No |
Name of the database where the table is created. If left unset, the current database is used. |
temp |
bool |
No |
Whether to create a temporary table. The default value is False. |
external |
bool |
No |
Whether to create a foreign table. The default value is False. |
overwrite |
bool |
No |
If set to True, the table is replaced if it already exists. The default value is False (currently, overwriting tables is not supported). |
partition_by |
sch.SchemaLike |
No |
Specifies a partition column; columns appearing in the partition column cannot appear in the regular column descriptions of the table. |
table_properties |
dict |
No |
Optional setting parameters at the table level. For details about the supported parameter ranges, see Table 1. |
store |
str |
No |
Table storage formats, supporting ORC, PARQUET, HUDI, and ICEBERG. |
location |
str |
No |
Table storage path. The value must be a valid OBS path. OBS buckets and parallel file systems are supported.
|
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot