Autoload: Zero-Config File Loading into Your Data Warehouse
Starlake autoload detects CSV, JSON, and XML file formats, infers target table schemas, and loads data into BigQuery, Snowflake, Databricks, DuckDB, or any supported warehouse -- all in a single command with zero configuration. It uses file naming conventions and directory structure to determine the target domain and table. Autoload handles file staging, validation, and archiving automatically.
For more control over parsing (e.g., multi-character delimiters or non-standard directories), use the manual load workflow instead. For a hands-on walkthrough, see the load tutorial.
Domain and Schema Terminology
Data warehouses organize tables into schemas. Depending on the engine, a schema is called schema (Snowflake, Databricks), catalog, or dataset (BigQuery). In Starlake, the term domain designates a schema, catalog, or dataset.
The folder name under incoming/ becomes the domain name in the target warehouse.
File Naming Conventions and Directory Structure
Autoload relies on conventions to map files to warehouse tables:
- Files are stored under the incoming directory:
$SL_ROOT/incoming/<domain>/<table><suffix>.<extension> - The folder name becomes the target schema (domain).
- The file name (without extension or suffix) becomes the target table name.
- A date/time suffix triggers APPEND mode (incremental loading). Files without a suffix use OVERWRITE mode.
For example, order_20240228.json and order_line_20240228.csv load into tables order and order_line respectively, both in APPEND mode.
incoming/
└── starbake/
├── product.xml
├── order_20240228.csv
└── order_line_20240228.csv
Running Autoload
Run the autoload command:
starlake autoload
Autoload performs four steps:
- Detects the file format from extension and content
- Infers the schema and generates YAML configuration files
- Stages files for loading
- Loads files into the target warehouse
Directory Structure After Autoload
After autoload runs, Starlake generates schema files and organizes data files across several directories.
metadata/load/
└── starbake/
├── _config.sl.yml
├── product.sl.yml
└── order.sl.yml
datasets/
├── archive/ # Files moved here after successful loading