Prerequisites
- SDK installed and configured (see SDK Quickstart)
- A target dataset (see Managing Datasets)
- An API key with write permissions
- Data file in a supported format (CSV, JSON, Parquet)
Supported formats
Upload workflow
The upload process involves these steps:- Get an upload URL - Request a pre-signed URL for uploading
- Upload the file - Send the file to the pre-signed URL
- Confirm the upload - Notify Narrative that the upload is complete
- Monitor ingestion - Track the ingestion job status
Basic upload
Here’s a complete example using Node.js:Ingesting from a URL
If your data is already accessible via URL, you can ingest directly:Monitoring upload status
After confirming an upload, monitor the ingestion job:Uploading multiple files
Upload multiple files to the same dataset:Data preparation
Before uploading, ensure your data meets the dataset schema requirements.CSV files
- Include a header row matching schema field names
- Use consistent formatting for dates and timestamps
- Handle special characters properly (escape or quote)
JSON files
Use JSON Lines format (one object per line):Hashing PII
If your data contains PII, hash it before uploading:Error handling
Best practices
Troubleshooting
Related content
Hashing PII
Prepare PII for upload
Tracking Jobs
Monitor upload progress
Managing Datasets
Dataset operations

