07 · Tables A→ZC · Create the table
Create an empty table from a schema
Define typed columns, a primary key, and constraints, then create the Delta table.
Create a table by defining its columns up front. At least one column must be the
primary key. The table is written as a Delta table at a location under a
registered storage connection.
Create
The CLI takes a bare table name, a storage --location, and the schema
as a JSON file (--schema-file):
eddytor create table orders \
--location s3://your-bucket/master-data \
--schema-file ./orders-schema.json \
--description "Order master data"orders-schema.json lists the columns (name, data_type, nullable,
is_primary_key) and any constraints - the same shape as the MCP body. Add CHECK
constraints later with eddytor create constraint.
POST /v1/for-developers/tables
Authorization: Bearer edd_live_…
{ "table_name": "orders",
"location": "s3://your-bucket/master-data",
"columns": [
{ "name": "order_id", "data_type": "Utf8", "nullable": false, "is_primary_key": true },
{ "name": "amount", "data_type": "Decimal(20,4)", "nullable": true }
],
"constraints": [{ "name": "amount_positive", "expr": "amount > 0" }] }{
"table_name": "products",
"location": "abfss://mdm@storage.dfs.core.windows.net/master-data",
"description": "Product master data",
"columns": [
{ "name": "product_id", "data_type": "Utf8", "nullable": false, "is_primary_key": true },
{ "name": "name", "data_type": "Utf8", "nullable": false },
{ "name": "price", "data_type": "Decimal(20,4)", "nullable": true }
],
"constraints": [{ "name": "price_positive", "expr": "price > 0" }]
}The rules that bite
Heads up
table_name is bare (products) - never
catalog.schema.products. location is a full storage URL - not a relative
path. At least one column needs is_primary_key: true.- Pick types deliberately -
Utf8for IDs,Decimalfor money. See Choose column types. - CHECK constraints (
{ name, expr }) are SQL expressions evaluated on every insert/merge - bad data never lands. - Column names are case-sensitive.
Verify
Confirm it landed and inspect the schema:
eddytor get tables
eddytor describe table eddytor sales ordersSee Verify it exists.
Other ways to get a table
- Have a CSV? Import it - Eddytor infers the schema.
- Just exploring? Spin up a demo table.