Skip to main content

Retrieve: Data Query


Retrieve: Data Query

This task exports data from your tenant by running SQL queries. Because of the flexibility of SQL, you can use a single SQL query to retrieve data from multiple data objects that are not pre-joined by Zuora.

The data query task runs the entered query and exports data in a ZIP or CSV file. 

See SQL Queries in Data Query for the supported SQL syntax, the available tables, and sample queries. See Overview of Data Query for more information about Data Query.

Task settings

  • File Format: Select the format for the exported file. Available formats are CSV, TSV, DSV, and JSON.
  • Mode: Select one of the following data sources to run the query for your task:
    • Live - Run data queries against Zuora transactional database, which are updated in near real-time.

    • Warehouse - run the query against Zuora Warehouse, which has better performance and fewer limitations than the Zuora transactional database. This option is available only if you have the Zuora Warehouse feature enabled in your tenant. For more information, see Zuora Warehouse.
      If this option is selected, you can see your warehouse size below the drop-down list.

  • Stop when no result returned: Select this option if you want the workflow to stop at this task if the query returns no data.
  • Use index join: If you want to use index join in your query, select this option. For more information about using index join in a data query task, see Use index join.
  • Compressed: Select whether you want to zip the output file. This option is selected by default. Use the unzip mode in the file operation task for decompression.
  • Read deleted: If selected, the query will only retrieve objects that are soft deleted. If not selected, only active objects will be retrieved. You cannot retrieve both soft-deleted and active data in a single data query task.
  • Obtain Fields: If selected, fields expressed by Liquid variables in the data query will be parsed during run time. 

Some workflow tasks may require the Data Query to successfully process. By checking the Skip Validation you may miss a few fields such as JSON Transform and CSV Translator.