Creating a Document Export Query with Configurable Joins
  • 08 Mar 2024
  • 2 minute read
  • Dark
    Light
  • PDF

Creating a Document Export Query with Configurable Joins

  • Dark
    Light
  • PDF

Article Summary

Overview

The Configurable Joins Document query base is the latest document export query base available in Slate. It is more computationally efficient and user friendly than previous document export methods. This query base exports all documents associated with records in Slate, not just documents that are person or application scoped. Filter criteria, including application and person-scoped filters, can be included in the query to limit the documents returned.

Creating a Query on the Document Base

  1. From the main navigation, select Queries / Reports.

  2. Click New Query.

  3. Select New Query. Configure the following settings:

    • Type: Configurable Joins

    • Category: Related

    • Base: Document

  4. Click Save. The query summary page appears.
    Configure_New_Query_Settings.png

  5. On the right of the query summary page, select Edit Properties and configure the following settings:

    • Limit Rows: 5000

      • There is a strict limit of 5,000 documents per query execution. Ensure that this setting is configured with 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)

      • The queue setting is incompatible with a document export. Do not adjust this setting.

    • Secondary Key: Copy and paste the following: doc__JID_.[stream]

  6. Click Save.

Add Standard Exports

The Configurable Joins Document query base requires that the exports pdf:xml and pdf:file be added. These are available as Direct Exports.

  • pdf:xml – This export specifies the file data to export

  • pdf:file – This export determines the filename

Exports_-_pdf-xml__pdf-file.png

Important!

Adding these exports to a query on the Document base will prepend the export names with "Document. " To function as a document export query, you must remove the prepended "Document " text. Click Rename Exports and remove this text before proceeding.

Rename_Exports.png

Replacing Custom SQL with Subquery Exports

Using Custom SQL in the Configurable Joins Document query base is discouraged. That said, if you used Custom SQL in past document export queries to customize the pdf:xml or pdf:file exports, you can now rebuild those exports without Custom SQL using Subquery Exports. Similarly, all other Exports and Filters can be rebuilt without the use of Custom SQL.

Configuring the Document Export Format

Regardless of whether you intend to download the documents manually or export them on a schedule, configuring the Schedule Export settings is required. These settings define the format of the downloaded files. Follow the instructions in the Scheduling Document Exports article to complete this step.

Troubleshooting

If your query is experiencing timeouts, visit the Writing and Optimizing Efficient Queries article for next steps.

Important!

The Configurable Joins Materials query base is meant only for exporting document metadata and not the documents themselves.


Was this article helpful?