Skip to main content
Early Access - The Dcycle CLI is currently available for enterprise customers. Contact us to learn more about access.

Overview

The dcy imports command provides a guided pipeline for bulk-importing data from CSV or Excel files. It handles column mapping, validation, error correction, and submission — all from the terminal. Supported data types (templates):

Import Workflow

A typical import follows these steps:
  1. Create — Upload your file and start an import session
  2. Suggest mapping — Get AI-assisted column mapping suggestions
  3. Confirm mapping — Lock in the column mapping
  4. Validate — Check all rows for errors
  5. Patch (optional) — Fix row-level errors
  6. Submit — Process the import and create records

Step 1: Explore the Template

Before importing, check what columns and formats the template expects:
Output:

Get Available Options

For category columns, check what values are accepted:

Step 2: Create Import Session

Upload a file and start a new import session:
Output:
Use --numeric-locale es_ES when your CSV uses commas as decimal separators (e.g. 4.500,50 instead of 4500.50).

Step 3: Map Columns

Get AI Suggestions

The system analyzes your source columns and suggests mappings:
Output:
Confidence tiers:
  • ≥ 0.92auto-mapped: high confidence, ready to use
  • 0.60–0.91suggested: review recommended
  • < 0.60unmapped: manual mapping required

Confirm the Mapping

Save the mapping to a JSON file and confirm it:
mapping.json

Check Unique Values

Before validating, preview how category values will be resolved:
Output:
Unresolved values will appear as validation errors. Fix them in your file or patch them after validation.

Step 4: Validate

Run validation to check all rows against the template rules:
Output:

Browse Rows

Inspect all rows (or just error rows) with pagination:

Step 5: Fix Errors (Optional)

Patch individual row values without re-uploading the file:
Output:
Then re-validate to confirm all errors are resolved:

Step 6: Submit

Once validation passes, submit the import for processing:
Output:

Managing Sessions

Check Session Status

Output shows current status (created, parsed, mapped, validating, validated, submitting, submitted, failed, expired), row counts, and processing info.

List All Sessions

Delete a Session

Remove a non-submitted session and its cached data:

Complete Example

End-to-end import of energy invoices:
All imports subcommands support --format json for scripting. Pipe through jq to extract fields like import_id, total_rows, or error_rows.

Next Steps

Invoices

Manage energy invoices for Scope 1 and Scope 2 emissions

Files

Upload and process documents

Examples

See end-to-end workflow examples

Configuration

Set up environments and API keys