Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

name: tool-import
kind: tool
description: Import a tabular source file (or pass through .pulse) into a managed handle.
type: reference
applies_to: mcp

When to use

CALL TO BRING AN EXTERNAL DATA FILE INTO PULSE AS A COHORT. CSV, TSV, NDJSON, JSON array, Parquet, Arrow, Excel, SPSS. Managed handles live in $PULSE_DATA_DIR/imports/ with a TTL sidecar; each read slides the expiry. .pulse passes through (managed=false).

Input

FieldNotes
source (req)relative to PULSE_DATA_DIR
formatdefault by extension (.sav/.zsav → spss)
handledefault = source basename
ttl24h, 7d (default) or pin (no expiry)
overwritedefault false → PULSE_IMPORT_HANDLE_EXISTS
schema, ignore_extra, floatexplicit schema BY NAME; inferred float width (import-schema-rows)
sheet / charsetExcel sheet / SPSS decode override (spss-import-schema)
groups, suggest_groupsparent groups: suggest, then apply (cohort-parent-groups)
vectors, vector_kindsWide batteries fold into ONE vector, as does a native list column (vector-fields)
source_tz, column_source_tz, dst_policy, source_tz_field, zone_fieldsource / cohort zones (import-source-zones)

Output

No envelope: handle, path (the managed .pulse), format (always pulse), source_format (as read), managed, rows_imported, imported_at, expires_at / ttl_seconds (absent: pinned / passthrough), plus, when non-empty, promoted_fields, null_warnings, width_warnings, source_warnings (PULSE_SPSS_*, PULSE_IMPORT_TIMESTAMP_TRUNCATED), groups, group_warnings, group_candidates, zone_warnings, rows_dropped, dropped_warnings.

Gotchas

  • SPSS is schema-authoritative: inference skipped; dictionaries hold SPSS CODES, not labels; a Pulse-written .sav restores its types. Read each PULSE_SPSS_* in source_warnings. No missing-value mode here; writing .sav is CLI-only.
  • Explicit schema matches BY NAME, never position; each mismatch refused, coded, before any row.
  • Naive datetimes import as UTC unless source_tz names the zone; a DST gap / overlap is fatal unless dst_policy resolves it. Re-import to change zone.
  • Zero rows out of a non-empty source is FATAL PULSE_IMPORT_ROW_ERROR; a partial failure warns PULSE_IMPORT_ROWS_DROPPED.
  • A .pulse.zst is refused PULSE_COHORT_COMPRESSED. Success rebinds session tools to the new cohort.

See