Skip to main content
Two steps: inspect and clean the file with pandas in the build sandbox (pandas + openpyxl pre-installed), then insert the rows with the zite client. Attach the .xlsx / .csv / .tsv file so the agent can read it while building.

1. Inspect the structure first

Check sheet names, shapes, and headers before mapping — data often lives on a secondary sheet:
Reading variants — first sheet, all sheets, a named sheet, or delimited text:
Uploaded files download to $ZITE_UPLOAD_DIRcd "$ZITE_UPLOAD_DIR" first, then bare filenames work.

2. Clean, then load into a table

Normalize with pandas, map each row to your table’s SDK field names, and insert with bulkCreate. Pass matchOn so re-imports upsert on a stable key instead of duplicating:

Gotchas

  • Check every sheet — key data is often on a secondary tab.
  • Pin dtypes to avoid inference surprises: pd.read_excel('f.xlsx', dtype={'id': str}). Use header=None when there’s no header row, usecols=[...] on wide files.
  • Handle missing valuesdf.isna().sum() finds them; drop or default before loading.
  • Keep script output under ~20 KB — summarize with .head() / .describe() rather than dumping frames.
  • Map to SDK names. bulkCreate records are keyed by field SDK name from .zite/db.ts, not spreadsheet labels. Up to 2,000 rows per call — chunk larger files.