Preparing Files for Processing
A file manifest (.csv file) is the entry point for the document processing pipelines. It lists all the files to be processed, providing a path to where they are located within the input bucket. It is also a way for you to pass through metadata that you want to associate with the extracted output. This means you do not need to implement downstream processing steps to merge clinical extraction output with chartdate and other critical file or patient-based metadata.
About this tutorial
This tutorial explains how to create a properly formatted manifest file, and how to upload it to your S3 bucket along with the documents it references. More details about the format and required columns can be found in File Manifest Schema.
We will walk through completing these 4 steps:
- Create the csv file
- Add a header row
- Add rows for each document you want to process
- Upload to S3
Step 1: Create the CSV File
Create a new file named manifest.csv using a text editor or spreadsheet application.
Any file name is acceptable (e.g. manifest_batch_1.csv, manifest_dataset_1.csv); however, it must be valid CSV and you must provide the correct name in the job request.
Step 2: Add the Header Row
The first row must contain column names. At minimum, these two columns are required:
document, andsubject_id
You may add any optional columns. Let’s add subject_name, subject_dob and subject_gender, so that your header row now contains:
Step 3: Add Document Rows
For each PDF document, add a row with the corresponding metadata:
Important: The document column must specify S3 object keys (paths) to your PDF documents. These are the S3 object keys relative to the root of your input bucket. For example, if your files are organized as follows:
Then, the object keys must be as follows:
Step 4: Upload to S3
Now, we will use the AWS CLI to upload the files your PDF documents and the corresponding manifest.csv to the designated S3 input bucket.
Before uploading, review the Requirements Checklist below to ensure your manifest is properly formatted.
During onboarding, you were provided with a bucket name to use for the input bucket. Make sure to use that one. The Extract API will only read from this bucket.
Using AWS CLI:
Using AWS CLI with a specific profile:
The examples above demonstrate the use of AWS CLI commands. You may use other methods to upload files to S3, including the AWS Console, AWS SDK, or other S3-compatible tools. For additional AWS CLI options, refer to the AWS CLI S3 documentation.
Validate S3 paths
Ensure the paths in the document column match the actual S3 keys.
Verify your upload:
Example S3 bucket contents:
Requirements Checklist
Before uploading your manifest, ensure these requirements are met:
-
All documents and manifest in the same S3 bucket with matching paths.
Documents must be accessible from the same S3 bucket where manifest.csv is stored.
-
All required columns populated.
Both
documentandsubject_idcolumns must have values for every row. -
Consistent date formats.
Use ISO Timestamp format for all date fields.
-
Properly quoted text fields.
Fields containing commas, quotes, or special characters must be enclosed in double quotes.
Common Pitfalls
Best Practices
- Use consistent naming conventions for your document S3 keys
- Include chartdate when available for better temporal tracking
- Keep subject_ids unique
- Avoid spaces in filenames. Use underscores or hyphens:
patient_001.pdfinstead ofpatient 001.pdf. - Avoid PHI in filenames. Replace PII (personal identifiers) with generated IDs
Troubleshooting Manifest Validation Errors
For guidance on troubleshooting validation errors, refer to the Troubleshooting Input Validation Errors section.

