Document Family Commands
Thekdx document-family command provides extended operations for working with document families, including exporting extracted data.
Available Commands
| Command | Description |
|---|---|
data | Export extracted JSON data from a document family |
content list | List all content objects in a document family |
content download | Download a content object (kddb file) |
Export Extracted Data
Retrieve the extracted and transformed data from a processed document family.Flags
| Flag | Default | Description |
|---|---|---|
-o, --output | stdout | Output file path |
--include-ids | true | Include element IDs in output |
--friendly-names | false | Use friendly names for fields |
--inline-audits | false | Include inline audit information |
--include-exceptions | false | Include exception information |
Examples
Output Format
The command exports data as formatted JSON:With Element IDs
When--include-ids is enabled (default), each data element includes an _id field that can be used for traceability and auditing:
With Friendly Names
When--friendly-names is enabled, field names are converted to human-readable format:
Content Object Operations
Document families contain one or more content objects (kddb files), each representing a version of the processed document. Thecontent subcommand provides direct access to these content objects.
List Content Objects
View all content objects within a document family:(latest) marker indicates the most recent content object.
Download Content Object
Download a content object (kddb file) from a document family:Flags
| Flag | Description |
|---|---|
--latest | Download the most recent content object (no ID required) |
-o, --output | Output file path (default: content-<id>.kddb) |
Examples
When to Use Content Download
Thecontent download command is useful when:
- Debugging: You need the raw kddb file to inspect with local tools
- Backup: Creating snapshots of processed documents
- Large Documents: The DFM export endpoint may timeout for document families with many content objects; direct download bypasses this limitation
- Offline Analysis: Running local analysis tools on the processed document
Content Object vs Data Export
| Use Case | Command |
|---|---|
| Get extracted JSON data for integration | kdx document-family data |
| Download the raw kddb file | kdx document-family content download |
| List available versions | kdx document-family content list |
How It Works
Thedata command:
- Fetches the document family to find its content objects
- Identifies the latest (most recent) content object
- Exports data from that content object via the API
- Formats and outputs the JSON
Integration Examples
Export to File for Analysis
Pipeline with Upload and Export
Bulk Export
Troubleshooting
No Content Objects Found
- Check processing status with
kdx store watch <id> - Verify the document family ID is correct
Empty Output
If the command returns empty JSON{}:
Cause: The document may not have completed processing or the content object has no exported data.
Solution:
- Ensure the document has reached the
PROCESSEDlabel - Check if the processing pipeline includes data extraction steps
