CREATE DATASET
CREATE DATASET
creates a new dataset from a source in the current connection.
Syntax
CREATE [ OR REPLACE ] DATASET [ IF NOT EXISTS ] dataset_name
{ FROM { table_name | 'scheme://bucket/path/to/file' } | AS query }
Dataset name
A unique name for the dataset in Predibase.
Connection name
A dataset is created from tables or files in the current connection.
FUTURE
: To change to a different connection name you can issue the following command:
USE CONNECTION connection_name
Examples
Database table
If the source connection is a database, then the object name will reference a specific table eg:
CREATE DATASET titanic FROM my_table
Object store path
If the source connection is an object store, then specify the path as a string literal eg:
CREATE DATASET titanic FROM 's3://bucket/path/to/titanic.csv'
Database query
FUTURE
: Or you can specific query against a specific source:
CREATE DATASET mysql_dataset AS SELECT * FROM mysql_connection.my_table