$ ./bin/uctable--help
Please provide a valid sub-command for table.Valid sub-commands for table are: read, get, create, list, write, deleteFor detailed help on table sub-commands, use bin/uc table <sub-command> --help
Read-write support for delta tables only
Only delta tables are supported for read and write operations.
Usage: bin/uc table create [options]
Required Params:
--full_name The full name in the format catalog_name.schema_name for schema, or catalog_name.schema_name.table_name for table/function/volume
--columns The columns of the table. Each column spec should be in the sql-like format "column_name column_data_type".Supported data types are BOOLEAN, BYTE, SHORT, INT, LONG, FLOAT, DOUBLE, DATE, TIMESTAMP, TIMESTAMP_NTZ, STRING, BINARY, DECIMAL. Multiple columns should be separated by a comma. For example: "id INT, name STRING".
--storage_location The storage location associated with the table. Need to be specified for external tables.
Optional Params:
--server UC Server to connect to. Default is reference server.
--auth_token PAT token to authorize uc requests.
--output To indicate CLI output format preference. Supported values are json and jsonPretty.
--format The format of the data source. Supported values are DELTA, PARQUET, ORC, JSON, CSV, AVRO and TEXT.
--properties The properties of the entity. Need to be in json format. For example: "{"key1": "value1", "key2": "value2"}".
createTable takes the full_name command-line option (from the given JSONObject) and extracts the parts (as if they were given separately).
Note
createTable accepts a three-level namespace ([catalog].[schema].[name]) only.
Note
The command-line option is full_name yet it is removed and replaced by the three parts.
Unless specified, createTable sets table_type to be EXTERNAL.
No Support for Managed Tables using CLI
Only EXTERNAL tables are created using ./bin/uc command-line utility.
Unless specified (using format CLI option), createTable sets data_source_format to be DELTA.
For EXTERNAL table type, createTable sets storage_location of the CreateTable as the value of storage_location command-line option and handleTableStorageLocation.
Storage Location
Storage locations must start with the following prefixes:
s3://
file:/
/ for absolute local filesystem paths
External Tables with Local Storage Locations
For external tables with non-s3:// storage locations, createTable creates a delta table only.
createTable requests the given TablesApi client to send the CreateTable to the server (that responds with a TableInfo).
handleTableStorageLocation supports storageLocations with one of the following prefixes (or throws a CliException):
s3://
file:/
/ for absolute local filesystem paths
For a local filesystem path (a non-s3:// storage location), handleTableStorageLocationcreates an empty delta table (the directory with a delta log at the storage location).