processors
Convert raw CSV, XML, and EDI text into JSON records, and back again, without touching account state. Processors are stateless transformation calls: you send bytes plus a rule set, and the platform returns the result. Nothing on the account is created or modified, so these commands work from a read-mode profile.
Use parse edi to validate a file definition before you build anything on it. Run a real partner file against the definition, then read the per-record validation failures from recordLevelErrors. That check costs one call and catches spec problems before an export, import, or flow depends on them.
REST API: Parsers & Generators
celigo processors <subcommand> [args] [flags]Supports all global flags.
Subcommands
list
List the processor catalog — parser/generator type names with their input and output media types.
invoke <name>
Call any catalog processor by name with a full JSON request body (--file <path> or stdin).
parse <csv|edi|xml> [dataFile]
Parse raw data into JSON records. Reads the file at [dataFile], or stdin.
generate <csv|edi> [recordsFile]
Generate formatted text from a JSON array of records. Reads [recordsFile], or stdin.
celigo processors list
List the processor catalog. The API returns an object keyed by processor name. The CLI flattens it into a sorted array of rows, so --format table and --jq behave as they do on every other list command. Default table columns: name, label, dataMediaType, resultMediaType.
Use list to discover valid invoke <name> values.
Signature
celigo processors listArguments
None.
Flags
Uses global flags only.
Example
Corresponds to: GET /v1/processors
celigo processors invoke
Call any processor in the catalog by name, supplying the complete JSON request body yourself. Use invoke for processors that parse and generate do not wrap, or when you need exact control over rules and options.
The CLI passes <name> into the endpoint path verbatim and does not validate it against a fixed list, so any name from processors list works. The common ones are csvParser, csvDataGenerator, structuredFileParser, structuredFileGenerator, and xmlParser.
Signature
Arguments
<name>
string
Yes
Processor name from processors list (e.g. csvParser, structuredFileParser).
Flags
-f, --file <path>
string
—
Read the JSON body from a file instead of stdin (--file - also means stdin).
Request body
A JSON object matching the processor's own request schema. Parsers take the raw text in data and the rule set in rules; generators take an array of records in data. An optional options object carries extras such as includeEmptyValues or an ediProfile envelope block.
Example
Corresponds to: POST /v1/processors/{name}
celigo processors parse
Parse raw data into JSON records. The first positional argument is the format — csv, edi, or xml — and it selects which processor endpoint the CLI calls. The raw input comes from the [dataFile] path, or from stdin when you omit the path or pass -.
The CLI sends the input bytes unaltered and never trims them. Row delimiters and segment terminators carry meaning in EDI and fixed-width data.
edi covers everything the structured-file parser handles: X12, EDIFACT, custom delimited, and fixed-width. Use it to validate a partner file against a spec.
Signature
Arguments
<format>
csv | edi | xml
Yes
Input format to parse into JSON records. Selects the processor endpoint.
[dataFile]
string
No
Path to the raw input file. Omit it, or pass -, to read stdin.
Flags
Each flag applies to specific formats only, named in bold at the start of its description. Passing a flag that does not apply to the chosen format is an error, not a no-op. See the gotchas below.
--rules <path>
string
—
csv, xml — full parsing-rules JSON file. Sent as rules verbatim, replacing the convenience flags below.
--file-definition-id <id>
string
—
edi — parse using a saved file definition by ID. Sent as rules._fileDefinitionId.
--file-definition <path>
string
—
edi — parse using an inline file definition JSON file. Sent as rules.fileDefinition.
--resource-path <path>
string
—
edi, xml — for xml, the XPath to the repeating element (e.g. /root/item); for edi, a dot path selecting the segment to return. Sent as rules.resourcePath.
--edi-profile-id <id>
string
—
edi — the CLI fetches that EDI profile resource and sends it as options.ediProfile for ISA/GS envelope context.
--column-delimiter <char>
string
—
csv — column delimiter.
--row-delimiter <char>
string
—
csv — row delimiter.
--has-header-row
boolean
false
csv — treat the first row as column headers.
--trim-spaces
boolean
false
csv — trim leading and trailing spaces from values.
--rows-to-skip <n>
integer
—
csv — number of rows to skip before parsing.
--include-empty-values
boolean
false
csv — return empty values as null instead of omitting the key. Sent as options.includeEmptyValues, not inside rules.
Rule requirements differ by format. csv needs no rule flags: every rules field is optional, so parse csv ./data.csv parses with server defaults. xml requires either --resource-path or --rules. edi requires exactly one of --file-definition-id or --file-definition. Passing both, or neither, fails before any request is sent.
Request body
The CLI assembles the body: the raw input goes in data and the resolved rule set in rules. For edi, the definition is wrapped inside rules, as either rules._fileDefinitionId or rules.fileDefinition:
Examples
Corresponds to: POST /v1/processors/csvParser for csv, POST /v1/processors/xmlParser for xml, and POST /v1/processors/structuredFileParser for edi. --edi-profile-id first issues an internal GET /v1/ediprofiles/{_id} to fetch the profile it embeds.
celigo processors generate
Generate formatted output from JSON records — the reverse of parse. The first positional argument is the format, either csv or edi. The input is a JSON array read from [recordsFile] or stdin, and each element of the array is one document to generate. The CLI rejects a non-array input before any request is made.
The generated text arrives inside a JSON response. Pipe it through --jq .data to write the raw file.
Signature
Arguments
<format>
csv | edi
Yes
Output format to generate. Selects the processor endpoint.
[recordsFile]
string
No
Path to a JSON array of records. Omit it, or pass -, to read stdin.
Flags
--rules <path>
string
—
csv — full generation-rules JSON file. Sent as rules verbatim, replacing the convenience flags below.
--file-definition <path>
string
—
edi — required. The generation rules JSON, sent directly as rules with no wrapper.
--edi-profile-id <id>
string
—
edi — the CLI fetches that EDI profile resource and sends it as options.ediProfile for ISA/GS envelope context.
--column-delimiter <char>
string
—
csv — column delimiter.
--row-delimiter <char>
string
—
csv — row delimiter.
--include-header
boolean
false
csv — emit a leading header row of column names.
--wrap-with-quotes
boolean
false
csv — wrap every value in double quotes.
generate has no --file-definition-id and no --resource-path. EDI generation accepts an inline definition only.
Request body
The records array goes in data and the resolved rule set in rules. For csv, rules holds the delimiter and header settings. For edi, the file definition document is the rules object itself. There is no fileDefinition key, so the definition's own format, delimiter block, and nested rules array all sit one level up:
Examples
Corresponds to: POST /v1/processors/csvDataGenerator for csv and POST /v1/processors/structuredFileGenerator for edi. --edi-profile-id first issues an internal GET /v1/ediprofiles/{_id} to fetch the profile it embeds.
Gotchas
Every processor command works in a
read-mode profile, even though the HTTP verb isPOST. Aread-mode profile normally blocksPOSTbefore the request leaves your machine./v1/processors/*is on the client's read-only allowlist because these calls are pure transforms. Nothing on the account can be created, run, or changed. You can pointprocessorsat a production account from a locked-down profile. Other read-onlyPOSTpaths are allowlisted the same way, including export previews and connection pings — see Profiles & regions.A
200 OKresponse does not mean every record parsed. Forparse edi, per-record validation failures come back inrecordLevelErrorsalongside the records that parsed. The HTTP call still succeeds and the exit code is still0. InspectrecordLevelErrorsdirectly, for example with--jq '.recordLevelErrors'.The parser wraps the definition; the generator does not.
parse edinests the definition insiderules, asrules._fileDefinitionIdfor a saved definition orrules.fileDefinitionfor an inline one.generate edisends the definition's fields asrulesitself. The two request shapes are not interchangeable. A JSON file that works with one fails with the other.generate edirequires an inline definition, even when that definition is saved on the account. Generation has no--file-definition-id, because the API accepts an inline rule set only. Fetch the saved resource withceligo file-definitions get <id>, write the definition fields to a local file, then pass that file to--file-definition.A flag for the wrong format is rejected, not ignored. All format flags live on one command, so the CLI checks applicability before doing any work. It fails with
Option(s) not applicable to format '<format>': <flags>and names each misapplied flag.--has-header-rowonparse ediand--edi-profile-idongenerate csvboth stop the command.--rulessupersedes the individual rule flags. With--rules <path>present, the file becomes the entirerulesobject.--column-delimiter,--has-header-row, and--resource-paththen have no effect.--include-empty-valuesis the exception: it travels inoptionsrather thanrules, so it still applies.Use
--jq .datato extract raw text. Generated output arrives wrapped in JSON, so redirecting the default output writes a JSON document rather than a usable file.--jq .data > out.ediwrites the generated text itself.stdin carries the data, not the rules.
--rules,--file-definition, and the other rule inputs require real file paths; passing-is rejected. Supply the payload as[dataFile]or[recordsFile]when you need stdin for something else. Only one input can come from stdin.generaterequires a JSON array. A bare object is rejected with a message stating that each array element is one document. Wrap a single record as[{ … }].
Related
file-definitions — the saved parsing and generation rules that
--file-definition-idreferences and--file-definitioninlines.edi-profiles — the trading partner envelope configuration that
--edi-profile-idsupplies for ISA/GS context.exports — where a validated parsing rule set runs in production, on file-based exports.
imports — where a validated generation rule set runs in production, producing outbound files.
edi-transactions — the transaction log for documents exchanged once the flow is live.
Last updated
Was this helpful?