Zuora Query
  • Dark
    Light

Zuora Query

  • Dark
    Light

This article is specific to the following platforms - Snowflake - Redshift - BigQuery.

Zuora Query

This component uses the Zuora REST API to to retrieve data and load it into a table. This action stages the data, so the table is reloaded each time. Users can then transform their data with Matillion ETL's library of transformation components.


Important Information

Some columns cannot be queried alongside other columns. For example, when using the ProductRatePlanChargeTier data source, only one of the following three columns can be queried at a time:

  1. DiscountAmount
  2. DiscountPercentage
  3. Price

When using the RatePlanCharge data source, only one of the following five columns can be queried at a time:

  1. DiscountAmount
  2. DiscountPercentage
  3. IncludedUnits
  4. OveragePrice
  5. Price

More information is available via the Zuora Knowledge Center.

In certain use cases with this component, when particular data sources are selected, additional unexpected columns may appear in the returned data that were not actually appearing within data selection configuration. Users can circumvent this issue by unchecking the Automatically include additional Currency Conversion information in data source exports checkbox within Zuora.

To do this, within Zuora navigate to Finance SettingsManage Currency Conversion and check or uncheck the box. For more information, please consult the Zuora documentation.

If a field has a NULL value when created, it is not displayed/shown when using ZOQL Query. Zuora uses a nullReplacement parameter—a string used to represent null values in the query results. If you do not set this parameter, null values are represented by the empty string in the query results. For more information, read Zuora's documentation.

Warning: This component is potentially destructive. If the target table undergoes a change in structure, it will be recreated. Otherwise, the target table is truncated. Where applicable, setting the Load Option Recreate Target Table to "Off" will prevent both recreation and truncation. Do not modify the target table structure manually.

Properties

Snowflake Properties

Property Setting Description
Name String A human-readable name for the component.
Basic/Advanced Mode Choice Basic: This mode will build a Zuora Query for you using settings from Data Source, Data Selection and Data Source Filter parameters. In most cases, this will be sufficient.
Advanced: This mode will require you to write an SQL-like query which is translated into one or more Zuora Rest API calls.
Rest Endpoint Select Select the endpoint for the Zuora service of choice.
Authentication Choice Select an authentication method, which must be setup in advance. Zuora uses a variation of the OAuth standard for authenticating 3rd party applications. More help is provided in the Zuora 3rd Party OAuth documentation.
Data Source Choice Select a data source from the pre-configured list.
Data Selection Choice Select one or more columns to return from the query.
Data Source Filter Input Column Select a column on which to base your filter.
Qualifier Is: Compares the column to the value using the comparator.
Not: Reverses the effect of the comparison, so "equals" becomes "not equals", "less than" becomes "greater than or equal to", etc.
Comparator Choose a method of comparing the column to the value. Possible comparators include: 'Equal To', 'Greater than', 'Less than', 'Greater than or equal to', 'Less than or equal to', 'Null'.
'Equal To' can match exact strings and numeric values while other comparators such as 'Greater than' will work only with numerics. The Null operator matches only Null values, ignoring whatever the value is set to.
Not all data sources support all comparators, thus it is likely only a subset of the above comparators will be available to choose from.
Value The value to be compared.
ZOQL Query Text This is a query written in ZOQL. (Property only available in 'Advanced' Mode)
Limit Number Fetching a large number of results from Zuora may use multiple API calls.
Type Select Choose between using a standard table or an external table.
External: The data will be put into an S3 bucket and referenced by an external table.
Standard: The data will be staged on an S3 bucket before being loaded into a table. This is the default setting.
Primary Keys Select Select one or more columns to be designated as the table's primary key.
Connection Options Parameter A JDBC parameter supported by the Database Driver. The available parameters are explained in the REST Data Model.
These are usually not required as sensible defaults are assumed.
Value A value for the given Parameter.
Warehouse Select Choose a Snowflake warehouse that will run the load.
Database Select Choose a database to create the new table in.
Schema Select Select the table schema. The special value, [Environment Default] will use the schema defined in the environment. For more information on using multiple schemas, see this article.
Target Table Text Provide a new table name.
Warning: This table will be recreated and will drop any existing table of the same name.
Stage Select Select a managed stage. The special value, [Custom], will create a stage "on the fly" for use solely within this component. Selecting [Custom] provides all of the properties typically seen in the Manage Stages dialog for your input.
If you select a managed stage that has already been configured in Manage Stages, the additional properties are not provided, as they have already been configured.
Manage Stages can be found by clicking the Environments panel in the lower-left, then right-clicking an environment. To learn more, read Manage Stages.
Stage Platform Select Select a staging setting.
Snowflake Managed: Allow Matillion ETL to create and use a temporary internal stage on Snowflake for staging the data. This stage, along with the staged data, will cease to exist after loading is complete.
(AWS only) Existing Amazon S3 Location: Activates the S3 Staging Area property, allowing users to specify a custom staging area on Amazon S3. The Stage Authentication property is also activated, letting users select a method of authenticating the data staging.
(Azure only) Existing Azure Blob Storage Location: Activates the Storage Account and Blob Container properties, allowing users to specify a custom staging location on Azure. The Stage Authentication property is also activated, letting users select a method of authenticating the data staging.
(GCP only) Existing Google Cloud Storage Location: Activates the GCS Staging Area property, allowing users to specify a custom staging area within Google Cloud Storage.
Stage Authentication Select (AWS and Azure only) Select an authentication method for data staging.
Credentials: Uses the credentials configured in the Matillion ETL environment. If no credentials have been configured, an error will occur.
Storage Integration: Use a Snowflake storage integration to authentication data staging. A storage integration is a Snowflake object that stores a generated identity and access management (IAM) entity for your external cloud storage, along with an optional set of allowed or blocked storage locations. To learn more, read Create Storage Integration.
Storage Integration Select Select a Snowflake storage integration from the dropdown list. Storage integrations are required to permit Snowflake to read data from and write to your cloud storage location (Amazon S3, Microsoft Azure, Google Cloud Storage) and must be set up in advance of selection.
To learn more about setting up a storage integration for use in Matillion ETL, read Storage Integration Setup Guide.
This property is only available when Stage Authentication is set to Storage Integration.
S3 Staging Area Select (AWS only) Select an S3 bucket for temporary storage. Ensure your access credentials have S3 access and permission to write to the bucket. Read Manage Credentials for details on setting up access. The temporary objects created in this bucket will be removed again after the load completes, they are not kept.
Use Accelerated Endpoint Boolean When True, data will be loaded via the s3-accelerate endpoint. Please consider the following information:
  • Enabling acceleration can enhance the speed at which data is transferred to the chosen S3 bucket. However, enhanced speed is not always guaranteed. Please consult Amazon S3 Transfer Acceleration Speed Comparison to compare S3 Direct versus S3 Accelerated Transfer speeds.
  • Users must manually set the accelerate configuration of an existing bucket. To learn more, see PutBucketAccelerateConfiguration in the API Reference, available at the AWS documentation.
  • This property is only available if the selected S3 bucket has Amazon S3 Transfer Acceleration enabled. For more information, including how to enable this feature, read Getting started with Amazon S3 Transfer Acceleration.
  • Cases may arise where Matillion ETL cannot determine whether the chosen S3 bucket has Amazon S3 Transfer Acceleration enabled. In these cases, Matillion ETL will reveal this property for user input on a "just in case" basis. In these cases, Matillion ETL may return a validation message that reads OK - Bucket could not be validated. You may also encounter cases where, if you do not have permission to get the status of the acceleration configuration (namely, the permission, GetAccelerateConfiguration) Matillion ETL will again show this property "just in case".
  • The default setting is False.
Storage Account Select (Azure Only) Select a storage account with your desired blob container to be used for staging the data. For more information, read Storage account overview.
Blob Container Select (Azure Only) Select a Blob container to be used for staging the data. For more information, read Introduction to Azure Blob storage.
GCS Staging Area Select (GCP only) The URL and path of the target Google Storage bucket to be used for staging the queried data. For more information, read Creating storage buckets.
Encryption Select (AWS Only) Decide on how the files are encrypted inside the S3 Bucket.This property is available when using an Existing Amazon S3 Location for Staging.
None: No encryption.
SSE KMS: Encrypt the data according to a key stored on KMS.
SSE S3: Encrypt the data according to a key stored on an S3 bucket
KMS Key ID Select (AWS Only) The ID of the KMS encryption key you have chosen to use in the 'Encryption' property.
New Table Name String Specify the name of the new table to be created.
This property is only available when Type is set to External.
Stage Database Select (Specify the stage database. The special value, [Environment Default], will use the database defined in the environment.
This property is only available when Type is set to External.
Stage Schema Select Specify the stage schema. The special value, [Environment Default], will use the schema defined in the environment.
This property is only available when Type is set to External.
Stage Select Select a stage.
This property is only available when Type is set to External.
Load Options Multiple Select Clean Staged Files: Destroy staged files after loading data. Default is On.
String Null is Null: Converts any strings equal to "null" into a null value. This is case-sensitive and only works with entirely lower-case strings. Default is Off.
Recreate Target Table: Choose whether the component recreates its target table before the data load. If Off, the component will use an existing table or create one if it does not exist. Default is On.
File Prefix: Give staged file names a prefix of your choice. The default setting is an empty field.
Trim String Columns: Remove leading and trailing characters from a string column. Default is On
Compression Type: Set the compression type to either GZip or None. The default is GZip.
Use Grid Variable: Check this checkbox to use a grid variable. This box is unchecked by default.
Auto Debug Select Choose whether to automatically log debug information about your load. These logs can be found in the Task History and should be included in support requests concerning the component. Turning this on will override any debugging Connection Options.
Debug Level Select The level of verbosity with which your debug information is logged. Levels above 1 can log huge amounts of data and result in slower execution.
1: Will log the query, the number of rows returned by it, the start of execution and the time taken, and any errors.
2: Will log everything included in Level 1, cache queries, and additional information about the request, if applicable.
3: Will additionally log the body of the request and the response.
4: Will additionally log transport-level communication with the data source. This includes SSL negotiation.
5: Will additionally log communication with the data source and additional details that may be helpful in troubleshooting problems. This includes interface commands.

Redshift Properties

Property Setting Description
Name String A human-readable name for the component.
Basic/Advanced Mode Choice Basic: This mode will build a Zuora Query for you using settings from Data Source, Data Selection and Data Source Filter parameters. In most cases, this will be sufficient.
Advanced: This mode will require you to write an SQL-like query which is translated into one or more Zuora Rest API calls.
Rest Endpoint Select Select the endpoint for the Zuora service of choice.
Authentication Choice Select an authentication method, which must be setup in advance. Zuora uses a variation of the OAuth standard for authenticating 3rd party applications. More help is provided in the Zuora 3rd Party OAuth documentation.
Data Source Choice Select a data source from the pre-configured list.
Data Selection Choice Select one or more columns to return from the query.
Data Source Filter Input Column Select a column on which to base your filter.
Qualifier Is: Compares the column to the value using the comparator.
Not: Reverses the effect of the comparison, so "equals" becomes "not equals", "less than" becomes "greater than or equal to", etc.
Comparator Choose a method of comparing the column to the value. Possible comparators include: 'Equal To', 'Greater than', 'Less than', 'Greater than or equal to', 'Less than or equal to', 'Null'.
'Equal To' can match exact strings and numeric values while other comparators such as 'Greater than' will work only with numerics. The Null operator matches only Null values, ignoring whatever the value is set to.
Not all data sources support all comparators, thus it is likely only a subset of the above comparators will be available to choose from.
Value The value to be compared.
ZOQL Query Text This is a query written in ZOQL. (Property only available in 'Advanced' Mode)
Limit Number Fetching a large number of results from Zuora may use multiple API calls.
Primary Keys Select Select one or more columns to be designated as the table's primary key.
Connection Options Parameter A JDBC parameter supported by the Database Driver. The available parameters are explained in the REST Data Model.
These are usually not required as sensible defaults are assumed.
Value A value for the given Parameter.
S3 Staging Area Select Select an S3 bucket for temporary storage. Ensure your access credentials have S3 access and permission to write to the bucket. Read Manage Credentials for details on setting up access. The temporary objects created in this bucket will be removed again after the load completes, they are not kept.
Use Accelerated Endpoint Boolean When True, data will be loaded via the s3-accelerate endpoint. Please consider the following information:
  • Enabling acceleration can enhance the speed at which data is transferred to the chosen S3 bucket. However, enhanced speed is not always guaranteed. Please consult Amazon S3 Transfer Acceleration Speed Comparison to compare S3 Direct versus S3 Accelerated Transfer speeds.
  • Users must manually set the accelerate configuration of an existing bucket. To learn more, see PutBucketAccelerateConfiguration in the API Reference, available at the AWS documentation.
  • This property is only available if the selected S3 bucket has Amazon S3 Transfer Acceleration enabled. For more information, including how to enable this feature, read Getting started with Amazon S3 Transfer Acceleration.
  • Cases may arise where Matillion ETL cannot determine whether the chosen S3 bucket has Amazon S3 Transfer Acceleration enabled. In these cases, Matillion ETL will reveal this property for user input on a "just in case" basis. In these cases, Matillion ETL may return a validation message that reads OK - Bucket could not be validated. You may also encounter cases where, if you do not have permission to get the status of the acceleration configuration (namely, the permission, GetAccelerateConfiguration) Matillion ETL will again show this property "just in case".
  • The default setting is False.
Type Select Choose between using a standard table or an external table.
Standard: The data will be staged on an S3 bucket before being loaded into a table.
External: The data will be put into an S3 Bucket and referenced by an external table.
Schema Select Select the table schema. The special value, [Environment Default] will use the schema defined in the environment. For more information on using multiple schemas, see this article. Note: An external schema is required if the 'Type' property is set to 'External'.
Target Table Text Provide a new table name.
Warning: This table will be recreated and will drop any existing table of the same name.
Location Text/Select When using an 'External' type table, Provide an S3 Bucket path that will be used to store the data. Once on an S3 bucket, the data can be referenced by the external table.
Encryption Select Decide on how the files are encrypted inside the S3 Bucket.
None: No encryption.
SSE KMS: Encrypt the data according to a key stored on KMS.
SSE S3: Encrypt the data according to a key stored on an S3 bucket
KMS Key ID Select The ID of the KMS encryption key you have chosen to use in the 'Encryption' property.
Load Options Multiple Select Columns Comp Update: Apply automatic compression to the target table. Default is On.
Stat Update: Automatically update statistics when filling a table. Default is On. In this case, it is updating the statistics of the target table.
Clean S3 Objects: Automatically remove UUID-based objects on the S3 bucket. Default is On. Effectively, users decide here whether to keep the staged data in the S3 bucket or not.
String Null is Null: Converts any strings equal to "null" into a null value. This is case-sensitive and only works with entirely lower-case strings. Default is On.
Recreate Target Table: Choose whether the component recreates its target table before the data load. If Off, the component will use an existing table or create one if it does not exist. Default is On.
File Prefix: Give staged file names a prefix of your choice. When this Load Option is selected, users should set their preferred prefix in the text field.
Compression Type: Set the compression type to either GZip or None. The default is GZip.
Use Grid Variable: Check this checkbox to use a grid variable. This box is unchecked by default.
Auto Debug Select Choose whether to automatically log debug information about your load. These logs can be found in the Task History and should be included in support requests concerning the component. Turning this on will override any debugging Connection Options.
Debug Level Select The level of verbosity with which your debug information is logged. Levels above 1 can log huge amounts of data and result in slower execution.
1: Will log the query, the number of rows returned by it, the start of execution and the time taken, and any errors.
2: Will log everything included in Level 1, cache queries, and additional information about the request, if applicable.
3: Will additionally log the body of the request and the response.
4: Will additionally log transport-level communication with the data source. This includes SSL negotiation.
5: Will additionally log communication with the data source and additional details that may be helpful in troubleshooting problems. This includes interface commands.

BigQuery Properties

Property Setting Description
Name String A human-readable name for the component.
Basic/Advanced Mode Choice Basic: This mode will build a Zuora Query for you using settings from Data Source, Data Selection and Data Source Filter parameters. In most cases, this will be sufficient.
Advanced: This mode will require you to write an SQL-like query which is translated into one or more Zuora Rest API calls.
Rest Endpoint Select Select the endpoint for the Zuora service of choice.
Authentication Choice Select an authentication method, which must be setup in advance. Zuora uses a variation of the OAuth standard for authenticating 3rd party applications. More help is provided in the Zuora 3rd Party OAuth documentation.
Connection Options Parameter A JDBC parameter supported by the Database Driver. The available parameters are explained in the REST Data Model.
These are usually not required as sensible defaults are assumed.
Value A value for the given Parameter.
Data Source Choice Select a data source from the pre-configured list.
Data Selection Choice Select one or more columns to return from the query.
Data Source Filter Input Column Select a column on which to base your filter.
Qualifier Is: Compares the column to the value using the comparator.
Not: Reverses the effect of the comparison, so "equals" becomes "not equals", "less than" becomes "greater than or equal to", etc.
Comparator Choose a method of comparing the column to the value. Possible comparators include: 'Equal To', 'Greater than', 'Less than', 'Greater than or equal to', 'Less than or equal to', 'Null'.
'Equal To' can match exact strings and numeric values while other comparators such as 'Greater than' will work only with numerics. The Null operator matches only Null values, ignoring whatever the value is set to.
Not all data sources support all comparators, thus it is likely only a subset of the above comparators will be available to choose from.
Value The value to be compared.
ZOQL Query Text This is a query written in ZOQL. (Property only available in 'Advanced' Mode)
Limit Number Fetching a large number of results from Zuora may use multiple API calls.
Table Type Select Select whether the table is Native (by default in BigQuery) or an external table.
Project Select The target BigQuery project to load data into. The special value, [Environment Default], will use the project defined in the Matillion ETL environment.
Dataset Select The target BigQuery dataset to load data into. The special value, [Environment Default], will use the dataset defined in the Matillion ETL environment.
Target Table String A name for the table.
Warning: This table will be recreated and will drop any existing table of the same name.
Only available when the table type is Native.
New Target Table String A name for the new external table.
Only available when the table type is External.
Cloud Storage Staging Area Cloud Storage Bucket The URL and path of the target Google Cloud Storage bucket to be used for staging the queried data.
Only available when the table type is Native.
Location Cloud Storage Bucket The URL and path of the target Google Cloud Storage bucket.
Only available when the table type is External.
Load Options Multiple Select Clean Cloud Storage Files: Destroy staged files on Cloud Storage after loading data. Default is On.
Cloud Storage File Prefix: Give staged file names a prefix of your choice. The default setting is an empty field.
Recreate Target Table: Choose whether the component recreates its target table before the data load. If Off, the component will use an existing table or create one if it does not exist. Default is On.
Use Grid Variable: Check this checkbox to use a grid variable. This box is unchecked by default.
Only available when the table type is Native.
Auto Debug Select Choose whether to automatically log debug information about your load. These logs can be found in the Task History and should be included in support requests concerning the component. Turning this on will override any debugging Connection Options.
Debug Level Select The level of verbosity with which your debug information is logged. Levels above 1 can log huge amounts of data and result in slower execution.
1: Will log the query, the number of rows returned by it, the start of execution and the time taken, and any errors.
2: Will log everything included in Level 1, plus cache queries and additional information about the request, if applicable.
3: Will additionally log the body of the request and the response.
4: Will additionally log transport-level communication with the data source. This includes SSL negotiation.
5: Will additionally log communication with the data source, as well as additional details that may be helpful in troubleshooting problems. This includes interface commands.

Synapse Properties

Property Setting Description
Name String A human-readable name for the component.
Basic/Advanced Mode Choice Basic: This mode will build a Zuora Query for you using settings from Data Source, Data Selection and Data Source Filter parameters. In most cases, this will be sufficient.
Advanced: This mode will require you to write an SQL-like query which is translated into one or more Zuora Rest API calls.
Rest Endpoint Select Select the endpoint for the Zuora service of choice.
Authentication Choice Select an authentication method, which must be setup in advance. Zuora uses a variation of the OAuth standard for authenticating 3rd party applications. More help is provided in the Zuora 3rd Party OAuth documentation.
Data Source Choice Select a data source from the pre-configured list.
Data Selection Choice Select one or more columns to return from the query.
Data Source Filter Input Column Select a column on which to base your filter.
Qualifier Is: Compares the column to the value using the comparator.
Not: Reverses the effect of the comparison, so "equals" becomes "not equals", "less than" becomes "greater than or equal to", etc.
Comparator Choose a method of comparing the column to the value. Possible comparators include: 'Equal To', 'Greater than', 'Less than', 'Greater than or equal to', 'Less than or equal to', 'Null'.
'Equal To' can match exact strings and numeric values while other comparators such as 'Greater than' will work only with numerics. The Null operator matches only Null values, ignoring whatever the value is set to.
Not all data sources support all comparators, thus it is likely only a subset of the above comparators will be available to choose from.
Value The value to be compared.
ZOQL Query Text This is a query written in ZOQL. (Property only available in 'Advanced' Mode)
Limit Number Fetching a large number of results from Zuora may use multiple API calls.
Connection Options Parameter A JDBC parameter supported by the Database Driver. The available parameters are explained in the REST Data Model.
These are usually not required as sensible defaults are assumed.
Value A value for the given Parameter.
Target Table Text Provide a new table name.
Warning: This table will be recreated and will drop any existing table of the same name.
Auto Debug Select Choose whether to automatically log debug information about your load. These logs can be found in the Task History and should be included in support requests concerning the component. Turning this on will override any debugging Connection Options.
Debug Level Select The level of verbosity with which your debug information is logged. Levels above 1 can log huge amounts of data and result in slower execution.
1: Will log the query, the number of rows returned by it, the start of execution and the time taken, and any errors.
2: Will log everything included in Level 1, cache queries, and additional information about the request, if applicable.
3: Will additionally log the body of the request and the response.
4: Will additionally log transport-level communication with the data source. This includes SSL negotiation.
5: Will additionally log communication with the data source and additional details that may be helpful in troubleshooting problems. This includes interface commands.

Variable Exports

This component makes the following values available to export into variables:

Source Description
Time Taken To Stage The amount of time (in seconds) taken to fetch the data from the data source and upload it to storage.
Time Taken To Load The amount of time (in seconds) taken to execute the COPY statement to load the data into the target table from storage.

Strategy

Connect to the target database and issue the query. Stream the results into objects on S3. Then create or truncate the target table and issue a COPY command to load the S3 objects into the table. Finally, clean up the temporary S3 objects.


What's Next