Database Query
  • Dark
    Light

Database Query

  • Dark
    Light

Database Query

The Database Query component empowers users to run SQL queries on an accessible database, and copy the results to a table via storage. Matillion ETL can support cloud or on-premises databases so long as they are network-accessible. Users can stage data with this component—get data into a table—to perform further processing and transformations on it. The target table should be considered temporary, because it will either be truncated or recreated each time the component runs.

Incremental loads using this component can be built using the JDBC Incremental Load component.

Warning: 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.


Snowflake VARCHAR Note

When querying data in Oracle databases, the Database Query component writes NUMBER fields as VARCHAR in Snowflake. Please rest assured, this action does not affect functionality or table output, but it can appear as though NUMBER fields have been converted to VARCHAR types when observing a table's metadata.

Matillion ETL handles negative or extremely large numbers by converting them into a STRING, which may not fit into a numeric value.

We advise performing a manual workaround, since mathematical operations cannot be performed on columns of a data type VARCHAR. To navigate this behaviour, we recommend either:

  1. Using a Convert Type component to cast the relevant VARCHAR fields back to NUMERIC data types after the data load.
  2. Pre-creating a table in the target database with the Snowflake data type NUMBER in the relevant columns.

Properties

Snowflake Properties

Property Setting Description
Name String A human-readable name for the component.
Basic/Advanced Mode Select Basic: constructs a query using the settings specified in the Data Source, Data Selection, and Data Source Filter properties. This is the default setting.
Advanced: this mode requires users to write an SQL-like query to call data from their chosen database.
Database Type Select Select the database type. Choose from:
Amazon Redshift: see the Amazon Redshift documentation for more details.
IBM DB2: see their website for more details.
IBM DB2 for i: see their website for more details.
Microsoft SQL Server: see their website for more details.
MySQL: see their website for more details.
Netezza: see their website for more details.
Oracle: see their website for more details.
PostgreSQL: see their website for more details.
SAP Hana: see their website for more details.
Snowflake: see their website for more details.
SQL Server (Microsoft Driver): see their website for more details.
Sybase ASE: see their website for more details.
Teradata: see their website for more details.
Note: For some databases, you must first provide a JDBC driver as not all drivers can be distributed with Matillion ETL. See this article for instructions on managing drivers. Matillion ETL can support cloud or on-premises databases so long as they are network-accessible.
Connection URL String The URL for your chosen JDBC database. Matillion ETL provides a template URL for each database type. Replace any placeholder values with the actual values of your database's URL. Remove any angular brackets < > as these are just for situating placeholder values.
Although many parameters and options can be added to the end of the URL, it is generally easier to add them in the Connection Options property, documented below.
Username String Input your database connection username.
Password String Input your database connection password. The password is masked, so it can be set, but not read. Users have the option to store their password inside the component, but Matillion highly recommends using the Password Manager feature.
Connection Options Parameter A JDBC parameter supported by the database driver. The available parameters are determined automatically from the driver, and may change from version to version. They are usually not required, since sensible defaults are assumed.
Value A value for the given parameter. Parameters and their allowed values are somewhat database-specific. The links below may help, or if you upload your own JDBC Driver, consult the documentation that was provided with it.
Data Source Select Select a data source.
Data Selection Select Select one or more columns from the chosen data source to return from the query.
Data Source Filter Input Column The available input columns vary depending upon the data source.
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", "Like", "Null".
"Equal to" can match exact strings and numeric values, while other comparators, such as "Greater than", will work only with numerics. The "Like" operator allows the wildcard character (%) to be used at the start and end of a string value to match a column. 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 that only a subset of the above comparators will be available to choose from.
Value The value to be compared.
SQL Query String Advanced Mode only.
Provide an SQL query, written in the dialect of the target database. The query can be as simple as SELECT * FROM tableName
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.
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 String 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 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.
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.
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.
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 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 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 acceleration 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 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 Select a Blob container to be used for staging the data. For more information, read Introduction to Azure Blob storage.
GCS Staging Area Select 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 Decide 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. Read AWS Key Management Service (AWS KMS) to learn more.
SSE S3: Encrypt the data according to a key stored on an S3 bucket. Read Using server-side encryption with Amazon S3-managed encryption keys (SSE-S3) to learn more.
KMS Key ID Select The ID of the KMS encryption key you have chosen to use in the Encryption property.
Concurrency Integer The number of S3 files to create. This helps when loading into Snowflake since files are loaded in parallel. In addition, Matillion ETL for Snowflake will be able to upload parts of these files concurrently.
The maximum concurrency is 8 times the number of processors on your cloud instance. For example: An instance with 2 processors has a maximum concurrency of 16.
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. Matillion ETL derives the structure of the target table from the source metadata, and not from the files generated in the staging location.
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.
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.

Redshift Properties

Property Setting Description
Name String A human-readable name for the component.
Basic/Advanced Mode Select Basic: constructs a query using the settings specified in the Data Source, Data Selection, and Data Source Filter properties. This is the default setting.
Advanced: this mode requires users to write an SQL-like query to call data from their chosen database.
Database Type Select Select the database type. Choose from:
Amazon Redshift: see the Amazon Redshift documentation for more details.
IBM DB2: see their website for more details.
IBM DB2 for i: see their website for more details.
Microsoft SQL Server: see their website for more details.
MySQL: see their website for more details.
Netezza: see their website for more details.
Oracle: see their website for more details.
PostgreSQL: see their website for more details.
SAP Hana: see their website for more details.
Snowflake: see their website for more details.
SQL Server (Microsoft Driver): see their website for more details.
Sybase ASE: see their website for more details.
Teradata: see their website for more details.
Note: For some databases, you must first provide a JDBC driver as not all drivers can be distributed with Matillion ETL. See this article for instructions on managing drivers. Matillion ETL can support cloud or on-premises databases so long as they are network-accessible.
Connection URL String The URL for your chosen JDBC database. Matillion ETL provides a template URL for each database type. Replace any placeholder values with the actual values of your database's URL. Remove any angular brackets < > as these are just for situating placeholder values.
Although many parameters and options can be added to the end of the URL, it is generally easier to add them in the Connection Options property, documented below.
Username String Input your database connection username.
Password String Input your database connection password. The password is masked, so it can be set, but not read. Users have the option to store their password inside the component, but Matillion highly recommends using the Password Manager feature.
Connection Options Parameter A JDBC parameter supported by the database driver. The available parameters are determined automatically from the driver, and may change from version to version. They are usually not required, since sensible defaults are assumed.
Value A value for the given parameter. Parameters and their allowed values are somewhat database-specific. The links below may help, or if you upload your own JDBC Driver, consult the documentation that was provided with it.
SQL Query String Input an SQL-like query, written according to the dialect of the target database.
This property is only available when Basic/Advanced Mode is set to Advanced.
Data Source Select Select a data source.
Data Selection Dual Listbox Select one or more columns from the chosen data source to return from the query.
Data Source Filter Input Column Select an input column for your filter. The available input columns vary depending upon the data source.
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 Select the comparator. Note: Not all comparators will work with all possible data sources.
Choose one of "Equal to", "Greater than", "Less than", "Greater than or equal to", "Less than or equal to", or "Like".
"Equal to" can match exact strings and numeric values, while other comparators such as "Greater than" and "Less than" will work only with numerics. The "Like" comparator allows the wildcard character % to be used at the start and end of a string value to match a column. The "Null" comparator matches only null values, ignoring whatever the value is set to.
Note: Not all data sources support all comparators, meaning that, often, only a subset of the above comparators will be available for selection.
Value The value to be compared.
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, read Schemas.
Note: An external schema is required if the Type property is set to "External".
Target Table String Provide a new table name.
Warning: This table will be recreated and will drop any existing table of the same name.
Location S3 Bucket Select an S3 bucket path that will be used to store the data. Once the data is on an S3 bucket, it can be referenced by an external table.
This property is only available when the Type property is set to "External".
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 acceleration 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.
Distribution Style Select All: Copy rows to all nodes in the Redshift cluster.
Auto: (Default) Allow Redshift to manage your distribution style.
Even: Distribute rows around the Redshift cluster evenly.
Key: Distribute rows around the Redshift cluster according to the value of a key column.
Table distribution is critical to good performance. See the Distribution styles documentation for more information.
Sort Key Multiple Select This is optional, and lets users specify one or more columns from the input that should be set as the table's sort key.
Sort keys are critical to good performance. Read Working with sort keys for more information.
Sort Key Options Select Decide whether the sort key is of a compound or interleaved variety. Read Working with sort keys for more information.
Primary Key Multiple Select Select one or more columns to be designated as the table's primary key.
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 existing table will be used. 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.
Concurrency Integer The number of S3 files to create. This helps when loading into Amazon Redshift as they are loaded in parallel. In addition, Matillion ETL for Redshift will be able to upload parts of these files concurrently.
The maximum concurrency is 8 times the number of processors on your cloud instance. For example: An instance with 2 processors has a maximum concurrency of 16.
Concurrency Method Select Absolute: uses the absolute value set in the Concurrency Value property (e.g. if set to 8, then eight files would be created in the staging store). This is the default setting.
STV_SLICES the concurrency is treated as a calculated value. The calculation is:
Number of files = COUNT(*) from STV_SLICES x concurrency-value.
If the STV_SLICES table count = 4, and we set the Concurrency Value to 8, then the number of files created in the staging store is 4 x 8 = 32.
Encryption Select Decide 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. Read AWS Key Management Service (AWS KMS) to learn more.
SSE S3: Encrypt the data according to a key stored on an S3 bucket. Read Using server-side encryption with Amazon S3-managed encryption keys (SSE-S3) to learn more.
KMS Key ID Select The ID of the KMS encryption key you have chosen to use in the Encryption property.

BigQuery Properties

Property Setting Description
Name String A human-readable name for the component.
Basic/Advanced Mode Select Basic: constructs a query using the settings specified in the Data Source, Data Selection, and Data Source Filter properties. This is the default setting.
Advanced: this mode requires users to write an SQL-like query to call data from their chosen database.
Database Type Select Select the database type. Choose from:
Amazon Redshift: see the Amazon Redshift documentation for more details.
IBM DB2: see their website for more details.
IBM DB2 for i: see their website for more details.
Microsoft SQL Server: see their website for more details.
MySQL: see their website for more details.
Netezza: see their website for more details.
Oracle: see their website for more details.
PostgreSQL: see their website for more details.
SAP Hana: see their website for more details.
Snowflake: see their website for more details.
SQL Server (Microsoft Driver): see their website for more details.
Sybase ASE: see their website for more details.
Teradata: see their website for more details.
Note: For some databases, you must first provide a JDBC driver as not all drivers can be distributed with Matillion ETL. See this article for instructions on managing drivers. Matillion ETL can support cloud or on-premises databases so long as they are network-accessible.
Connection URL String The URL for your chosen JDBC database. Matillion ETL provides a template URL for each database type. Replace any placeholder values with the actual values of your database's URL. Remove any angular brackets < > as these are just for situating placeholder values.
Although many parameters and options can be added to the end of the URL, it is generally easier to add them in the Connection Options property, documented below.
Username String Input your database connection username.
Password String Input your database connection password. The password is masked, so it can be set, but not read. Users have the option to store their password inside the component, but Matillion highly recommends using the Password Manager feature.
Connection Options Parameter A JDBC parameter supported by the database driver. The available parameters are determined automatically from the driver, and may change from version to version. They are usually not required, since sensible defaults are assumed.
Value A value for the given parameter. Parameters and their allowed values are somewhat database-specific. The links below may help, or if you upload your own JDBC Driver, consult the documentation that was provided with it.
Data Source Select Select a data source.
Data Selection Select Select one or more columns from the chosen data source to return from the query.
Data Source Filter Input Column The available input columns vary depending upon the data source.
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", "Like", "Null".
"Equal to" can match exact strings and numeric values, while other comparators, such as "Greater than", will work only with numerics. The "Like" operator allows the wildcard character (%) to be used at the start and end of a string value to match a column. 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 that only a subset of the above comparators will be available to choose from.
Value The value to be compared.
SQL Query String Advanced Mode only.
Provide an SQL query, written in the dialect of the target database. The query can be as simple as SELECT * FROM tableName
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.

Synapse Properties

Property Setting Description
Name String A human-readable name for the component.
Basic/Advanced Mode Select Basic: constructs a query using the settings specified in the Data Source, Data Selection, and Data Source Filter properties. This is the default setting.
Advanced: this mode requires users to write an SQL-like query to call data from their chosen database.
Database Type Select Select the database type. Choose from:
Amazon Redshift: see the Amazon Redshift documentation for more details.
IBM DB2: see their website for more details.
IBM DB2 for i: see their website for more details.
Microsoft SQL Server: see their website for more details.
MySQL: see their website for more details.
Netezza: see their website for more details.
Oracle: see their website for more details.
PostgreSQL: see their website for more details.
SAP Hana: see their website for more details.
Snowflake: see their website for more details.
SQL Server (Microsoft Driver): see their website for more details.
Sybase ASE: see their website for more details.
Teradata: see their website for more details.
Note: For some databases, you must first provide a JDBC driver as not all drivers can be distributed with Matillion ETL. See this article for instructions on managing drivers. Matillion ETL can support cloud or on-premises databases so long as they are network-accessible.
Connection URL String The URL for your chosen JDBC database. Matillion ETL provides a template URL for each database type. Replace any placeholder values with the actual values of your database's URL. Remove any angular brackets < > as these are just for situating placeholder values.
Although many parameters and options can be added to the end of the URL, it is generally easier to add them in the Connection Options property, documented below.
Username String Input your database connection username.
Password String Input your database connection password. The password is masked, so it can be set, but not read. Users have the option to store their password inside the component, but Matillion highly recommends using the Password Manager feature.
Connection Options Parameter A JDBC parameter supported by the database driver. The available parameters are determined automatically from the driver, and may change from version to version. They are usually not required, since sensible defaults are assumed.
Value A value for the given parameter. Parameters and their allowed values are somewhat database-specific. The links below may help, or if you upload your own JDBC Driver, consult the documentation that was provided with it.
Data Source Select Select a data source.
Data Selection Select Select one or more columns from the chosen data source to return from the query.
Data Source Filter Input Column The available input columns vary depending upon the data source.
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", "Like", "Null".
"Equal to" can match exact strings and numeric values, while other comparators, such as "Greater than", will work only with numerics. The "Like" operator allows the wildcard character (%) to be used at the start and end of a string value to match a column. 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 that only a subset of the above comparators will be available to choose from.
Value The value to be compared.
SQL Query String Advanced Mode only.
Provide an SQL query, written in the dialect of the target database. The query can be as simple as SELECT * FROM tableName
Schema Select Select the table schema. The special value, [Environment Default], will use the schema defined in the environment. For more information on schemas, please see the Azure Synapse documentation.
Table String Provide a new table name.
Warning: This table will be recreated on each run of the job, and drop any existing table of the same name.
Storage Account Select Select an Azure storage account with your desired blob container to be used for staging the data.
Please visit the Azure documentation for help creating an Azure Storage Account.
Blob Container Select Select a blob container to be used for staging the data. The blob containers available for selection depend on the chosen storage account.
Load Options Multiple Select Configure this Orchestration Job's load options. These load options will apply each time the job runs. Sensible defaults are assumed.
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 load option 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 set to Off, the existing table will be used instead. Default is On. Matillion ETL derives the structure of the target table from the source metadata, and not from the files generated in the staging location.
File Prefix: Give staged file names a prefix of your choice. The default setting is an empty 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.
Distribution Style Select Select the distribution style
Hash: This setting assigns each row to one distribution by hashing the value stored in the distribution_column_name. The algorithm is deterministic, meaning it always hashes the same value to the same distribution. The distribution column should be defined as NOT NULL, because all rows that have NULL are assigned to the same distribution.
Replicate: This setting stores one copy of the table on each Compute node. For SQL Data Warehouse, the table is stored on a distribution database on each Compute node. For Parallel Data Warehouse, the table is stored in an SQL Server filegroup that spans the Compute node. This behavior is the default for Parallel Data Warehouse.
Round Robin: Distributes the rows evenly in a round-robin fashion. This is the default behaviour.
For more information, please read this article.
Distribution Column Select Select the column to act as the distribution column. This property is only available when the Distribution Style property is set to "Hash".
Index Type Select Select the table indexing type. Options include:
Clustered: A clustered index may outperform a clustered columnstore table when a single row needs to be retrieved quickly. The disadvantage to using a clustered index is that only queries that benefit are the ones that use a highly selective filter on the clustered index column. Choosing this option prompts the Index Column Grid property.
Clustered Column Store: This is the default setting. Clustered columnstore tables offer both the highest level of data compression and the best overall query performance, especially for large tables. Choosing this option prompts the Index Column Order property.
Heap: Users may find that using a heap table is faster for temporarily landing data in Synapse SQL pool. This is because loads to heaps are faster than to index tables, and in some cases, the subsequent read can be done from cache. When a user is loading data only to stage it before running additional transformations, loading the table to a heap table is much faster than loading the data to a clustered columnstore table.
For more information, please consult the Azure Synapse documentation.
Index Column Grid Name The name of each column.
Sort Assign a sort orientation of either ascending (Asc) or descending (Desc).
Index Column Order Multiple Select Select the columns in the order to be indexed.
Partition Key Select Select the table's partition key. Table partitions determine how rows are grouped and stored within a distribution.
For more information on table partitions, please refer to this article.

Delta Lake Properties

Property Setting Description
Name String A human-readable name for the component.
Basic/Advanced Mode Select Basic: constructs a query using the settings specified in the Data Source, Data Selection, and Data Source Filter properties. This is the default setting.
Advanced: this mode requires users to write an SQL-like query to call data from their chosen database.
Database Type Select Select the database type. Choose from:
Amazon Redshift: see the Amazon Redshift documentation for more details.
IBM DB2: see their website for more details.
Microsoft SQL Server: see their website for more details.
MySQL: see their website for more details.
Oracle: see their website for more details.
PostgreSQL: see their website for more details.
SAP Hana: see their website for more details.
Snowflake: see their website for more details.
SQL Server (Microsoft Driver): see their website for more details.
Sybase ASE: see their website for more details.
Teradata: see their website for more details.
Note: For some databases, you must first provide a JDBC driver as not all drivers can be distributed with Matillion ETL. See this article for instructions on managing drivers. Matillion ETL can support cloud or on-premises databases so long as they are network-accessible.
Connection URL String The URL for your chosen JDBC database. Matillion ETL provides a template URL for each database type. Replace any placeholder values with the actual values of your database's URL. Remove any angular brackets < > as these are just for situating placeholder values.
Although many parameters and options can be added to the end of the URL, it is generally easier to add them in the Connection Options property, documented below.
Username String Specify the username to connect to the database.
Password Select | String Specify the password to connect to the database. Users can either select a password entry from the dropdown list when Use Password Manager is selected, or pass the password as a string by clicking the option Store in component:. To add or manage password entries, click Manage. Read Manage Passwords for more information.
Connection Options Parameter A JDBC parameter supported by the database driver. The available parameters are determined automatically from the driver, and may change from version to version. They are usually not required, since sensible defaults are assumed.
Value A value for the given parameter. Parameters and their allowed values are somewhat database-specific.
SQL Query SQL Write the component's query in an SQL-like fashion. Only available when Basic/Advanced Mode is set to "Advanced".
Data Source Select Select a data source.
Data Selection Select Select one or more columns from the chosen data source to return from the query.
Data Source Filter Input Column The available input columns vary depending upon the data source.
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", "Like", "Null".
"Equal to" can match exact strings and numeric values, while other comparators, such as "Greater than", will work only with numerics. The "Like" operator allows the wildcard character (%) to be used at the start and end of a string value to match a column. 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 that only a subset of the above comparators will be available to choose from.
Value The value to be compared.
Combine Filters Select Use the defined data source filters in combination with one another according to either And or Or.
Limit Integer Set a numeric value to limit the number of rows that can be loaded.
Database Select Select the Delta Lake database. The special value, [Environment Default], will use the database specified in the Matillion ETL environment setup.
Table String Specify the new table name.
S3 Staging Area Select (AWS only) Select an S3 bucket for staging.
Storage Account Select (Azure only) Select an Azure Blob Storage account. An Azure storage account contains all of your Azure Storage data objects: blobs, files, queues, tables, and disks. For more information, read Storage account overview.
Blob Container Select (Azure only) A Blob Storage location. The available blob containers will depend on the selected storage account.
Encryption Select (AWS only) Specify how files are encrypted inside the S3 Bucket.
None: No encryption.
SSE KMS: Encrypt the data according to a key stored on KMS. Read AWS Key Management Service (AWS KMS) to learn more.
SSE S3: Encrypt the data according to a key stored on an S3 bucket. Read Using server-side encryption with Amazon S3-managed encryption keys (SSE-S3) to learn more.
KMS Key ID Select (AWS only) The ID of the KMS encryption key you have chosen to use in the Encryption property.
Concurrency Integer (AWS only) The number of S3 files to create. Matillion ETL for Delta Lake will be able to upload parts of these files concurrently.
The maximum concurrency is 8 times the number of processors on your cloud instance. For example: An instance with 2 processors has a maximum concurrency of 16.
Load Options Multiple Select Clean Staged Files: Destroy staged files after loading data. The 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. The 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. The default is On. Matillion ETL derives the structure of the target table from the source metadata, and not from the files generated in the staging location.
File Prefix: Give staged file names a prefix of your choice. The default is an empty field (no prefix).
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.

Using Azure Active Directory authentication with an SQL Server database

For users who wish to connect to an SQL Server database using Azure Active Directory authentication, please follow these steps in Matillion ETL:

  1. Set the Database Type property to SQL Server (Microsoft Driver).
  2. Provide the database's Connection URL using the template jdbc:sqlserver://<host>;databaseName=<database>
  3. In the Connection Options property, set "domain" as my_domain_name. This is a placeholder value for your domain name.
  4. In the Connection Options property, set "authenticationScheme" as NTLM.
  5. In the Connection Options property, set "authentication" as ActiveDirectoryPassword.

For further information, read Connecting using Azure Active Directory authentication.


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.


Video