- 03 Dec 2025
- Print
- DarkLight
- PDF
Building a Document Export Query
- Updated 03 Dec 2025
- Print
- DarkLight
- PDF
To export documents from Slate, you’ll create a query that returns one row per document. You can use filters to limit the documents that are returned by this query.
Creating the query
Go to Queries / Reports.
Select New Query.
Configure the following settings:
Select Save.
Select Edit Properties.
Configure the following settings:
Limit Rows: There is a strict limit of 5,000 documents per query execution, so this must be a value of 5,000 or less.
Execution Options: Retrieve only the new records since the query was last run
Fetch Behavior: Preserve where clause on fetch if required by one or more filters.
Queue: None (default)
Queues can’t be used with a document export.
Do not adjust this setting.
Secondary Key: Paste the following:
doc__JID_.[stream]
Select Save.
Adding required exports
To create a document export query, you must include the direct exports pdf:xml and pdf:file:
pdf:xml: Specifies the file data to exportpdf:file: Determines the filename
To add these exports to the query:
Select Export.
Select Continue.
Select Rename Exports.
For both exports, remove the preceding
Document. The exports must be namedpdf:fileandpdf:xml.
Select Save.
Adding metadata
You can add metadata to your exported documents by recreating the pdf:xml direct export as a subquery export.
📖 Adding a Header or Footer to Documents in a Document Export Query
Customizing file names
Slate generates unique file names for exported documents using the pdf:file direct export.
You can customize the file name scheme by recreating pdf:file as a subquery export.
📖 Customizing the document file name in a document export query
➡️ Next up: Scheduling the document export
Your next step is to configure the query’s schedule export settings, which define the format of the exported files.


