Load & edit

Import a CSV

Infer the schema from a CSV sample, then create the table and load the rows in one step.

import_csv creates a table and inserts the rows in one step. Infer the schema first so you fix type surprises before they land.

Step 1: Infer the schema

infer_schema reads a CSV sample and returns the columns, Arrow types (with nullability), and domain candidates - low-cardinality string columns worth locking down (with their distinct values). The delimiter is auto-detected.

infer_schema(csv_content="product_id,name,category,price\nP001,Widget,Electronics,29.99\n...")

Review the output before committing. Common adjustments:

InferredUsually should be
Dates as Utf8Date32 / Timestamp
IDs as Int64Utf8 - preserves leading zeros
Boolean-like strings ("yes"/"no")leave as Utf8, set a fixed domain after import

Step 2: Import

For an existing table, load a file with insert:

eddytor insert table eddytor sales orders --file ./orders.csv

To create-and-load in one step, use the MCP import_csv tool, or create the table then insert.

{
  "table_name": "products",
  "location": "abfss://container@account.dfs.core.windows.net/master-data",
  "primary_key_column": "product_id",
  "csv_content": "product_id,name,category,price\nP001,Widget,Electronics,29.99\n...",
  "non_nullable_columns": ["product_id", "name", "category"]
}

delimiter auto-detects , ; \t | - set it explicitly only if detection fails.

Rules that bite

Heads up

table_name is bare (products), location is a full URL, and primary_key_column must be a column that exists in the CSV. If the import fails (type conflict, duplicate PKs), the table is not created - fix the data and retry.
  • csv_content has a ~5MB limit over MCP. For larger files, create the table with a first batch, then insert_rows the rest (or use the CLI insert with a file).
  • Empty strings are not NULL - check your nullability settings.
  • Leading zeros: keep IDs Utf8 - see column types.

After import

  1. profile_table - verify row count and null distribution.
  2. Set domains on the candidates infer_schema flagged (Govern with domains).
  3. validate_constraints + validate_domain_values.

On this page