> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Database Query

export const ComponentMetadata = ({warehouses, unsupportedWarehouses = [], componentType, connectionInputs, connectionOutputs}) => {
  const allWarehouses = [...warehouses.map(w => ({
    name: w,
    supported: true
  })), ...unsupportedWarehouses.map(w => ({
    name: w,
    supported: false
  }))];
  return <div style={{
    background: 'var(--colors-background-light, #f9fafb)',
    border: '1px solid var(--colors-border-default, #e5e7eb)',
    borderRadius: '12px',
    padding: '20px 28px',
    marginBottom: '28px',
    boxShadow: '0 1px 4px rgba(0,0,0,0.10)'
  }}>
      <table style={{
    width: '100%',
    borderCollapse: 'collapse'
  }}>
        <tbody>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle',
    width: '180px'
  }}>Project Availability</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>
              <div style={{
    display: 'flex',
    flexWrap: 'wrap',
    gap: '8px'
  }}>
                {allWarehouses.map((w, i) => <span key={i} style={{
    background: w.supported ? '#dcfce7' : '#fee2e2',
    color: w.supported ? '#15803d' : '#b91c1c',
    border: `1px solid ${w.supported ? '#bbf7d0' : '#fca5a5'}`,
    borderRadius: '9999px',
    padding: '3px 12px',
    fontSize: '0.85rem',
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
                    {w.name} {w.supported ? '✅' : '❌'}
                  </span>)}
              </div>
            </td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Component Type</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{componentType}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Inputs</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{connectionInputs}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Outputs</td>
            <td style={{
    verticalAlign: 'middle'
  }}>{connectionOutputs}</td>
          </tr>
        </tbody>
      </table>
    </div>;
};

export const m_runner = "Maia runner";

<ComponentMetadata warehouses={["Snowflake", "Databricks", "Amazon Redshift"]} unsupportedWarehouses={["Google BigQuery"]} componentType="Connector, Orchestration" connectionInputs="One" connectionOutputs="Unlimited" />

<Note>
  We recommend using the following individual connectors instead of using Database Query to fetch data from the corresponding database type. These connectors offer an Incremental Load option, which allows you to only load new or updated records each time your pipeline runs.

  * [Amazon Redshift Load](/docs/components/amazon-redshift-load)
  * [IBM Db2 for i Load](/docs/components/ibm-db2-load)
  * [MariaDB Load](/docs/components/mariadb-load)
  * [Microsoft SQL Server Load](/docs/components/microsoft-sql-server-load)
  * [Oracle Load](/docs/components/oracle-load)
  * [PostgreSQL Load](/docs/components/postgresql-load)
  * [Snowflake Load](/docs/components/snowflake-load)
  * [Sybase ASE Load](/docs/components/sybase-ase-load)
</Note>

The Database Query component runs SQL queries on an accessible database, and copies the results to a table via storage. You can query cloud or on-premises databases, as long as they are network-accessible. You can stage data (get data into a table) with this component, 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.

You *do not* need to use the Create Table component when using this component.

Once the component has run once, you can use transformation pipelines to transform your data to fit your business requirements.

If the component requires access to a cloud provider (AWS, Azure, or Google Cloud), it will use credentials as follows:

* If using [Matillion Full SaaS](/docs/guides/runner-overview#matillion-full-saas): The component will use the [cloud credentials](/docs/guides/cloud-credentials) associated with your environment to access resources.
* If using [Hybrid SaaS](/docs/guides/runner-overview#hybrid-saas): By default the component will inherit the agent's execution role (service account role). However, if there are [cloud credentials](/docs/guides/cloud-credentials) associated to your environment, these will overwrite the role.

<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. Setting the load option **Recreate Target Table** to **Off** will prevent both recreation and truncation. Do not modify the target table structure manually.
</Warning>

<Note>
  We recommend using key-pair authentication for this component instead of a username and password, because [Snowflake has announced plans to block single-factor password authentication by November 2025](https://www.snowflake.com/en/blog/blocking-single-factor-password-authentification/). For more information, read our [Tech note](/docs/tech-notes/tech-note-snowflake-to-block-single-factor-password-authentication).
</Note>

***

## Video example

<iframe width="560" height="315" src="https://www.youtube.com/embed/z45hjwWOnRo?si=VnhWET7kK6mjCj_6&enablejsapi=1" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen />

***

## Properties

Reference material is provided below for the Connect, Configure, Destination, and Advanced Settings properties.

<ResponseField name="Name" type="string" required>
  A human-readable name for the component.
</ResponseField>

### Connect

<ResponseField name="Database Type" type="drop-down" required>
  Select the database type. Refer to section [Database driver versions](#database-driver-versions) further down for more information.

  Choose from:

  * Amazon Redshift
  * IBM Db2 for i
  * MariaDB
  * Microsoft SQL Server
  * Oracle
  * PostgreSQL
  * Snowflake
  * SQL Server (Microsoft Driver)
  * Sybase ASE
</ResponseField>

{/* <!-- param-start:[connectionUrl] | warehouses: [snowflake, databricks, redshift] --> */}

<ResponseField name="Connection URL" type="string" required>
  The URL for your chosen JDBC database. The general pattern of the URL will depend on the database, as follows:

  | Database                      | URL                                                      |
  | ----------------------------- | -------------------------------------------------------- |
  | Amazon Redshift               | `jdbc:redshift://<host>/<database>`                      |
  | IBM Db2 for i                 | `jdbc:as400://<host>/<database>`                         |
  | MariaDB                       | `jdbc:mariadb://<host>/<database>`                       |
  | Microsoft SQL Server          | `jdbc:jtds:sqlserver://<host>/<database>`                |
  | Oracle                        | `jdbc:oracle:thin:@<host>:1521:<database>`               |
  | PostgreSQL                    | `jdbc:postgresql://<host>/<database>`                    |
  | Snowflake                     | `jdbc:snowflake://dummy-account.snowflakecomputing.com/` |
  | SQL Server (Microsoft Driver) | `jdbc:sqlserver://<host>;databaseName=<database>`        |
  | Sybase ASE                    | `jdbc:jtds:sybase://<host>/<database>`                   |

  Make appropriate substitutions for the `<host>` and `<database>` parameters in these URL strings.

  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.
</ResponseField>

<Warning>
  For this component to work with a Microsoft SQL Server database connection, you *must* set the connection option `trustServerCertificate` to `true`.

  If you're using certified SSL keys, you *don't* need this connection option to be set. Read [SqlConnectionStringBuilder.TrustServerCertificate Property](https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnectionstringbuilder.trustservercertificate?view=net-9.0-pp) to learn more.
</Warning>

<ResponseField name="Username" type="string">
  A valid username for the database connection. Optional because authentication can also be performed using the `Connection Options` property.
</ResponseField>

{/* <!-- param-start:[password] | warehouses: [snowflake, databricks, redshift] --> */}

<ResponseField name="Password" type="drop-down">
  Choose the secret definition that represents your credentials for this connector.

  If you have not already saved your credentials for this connector as a secret definition, click **Add secret** to create a secret definition representing these credentials. Read [Secrets and secret definitions](/docs/guides/secrets-and-secret-definitions) for details about creating a secret definition.

  Optional because authentication can also be performed using the `Connection Options` property.
</ResponseField>

{/* <!-- param-start:[passwordType] | warehouses: [snowflake] --> */}

<ResponseField name="Password Type" type="drop-down">
  When `Database Type` is set to **Snowflake**, choose whether your password is in the form of a password or private key.
</ResponseField>

{/* <!-- param-start:[privateKey] | warehouses: [snowflake] --> */}

<ResponseField name="Private Key" type="drop-down">
  When `Database Type` is set to **Snowflake** and `Password Type` is set to **Private key**, select the secret that represents your Snowflake private key.

  Read [AWS Secrets Manager](/docs/administration/aws-secrets-manager) to learn how to store secrets in AWS.

  <Note>The key/value JSON pattern shown in the warning below (with `\n` for newlines) is specific to key/value formatted secrets used by this component. Environment-level Snowflake connections use plaintext storage instead. Read [Using Snowflake key-pair authentication](/docs/administration/snowflake-key-pair-authentication) for details.</Note>

  <Warning>
    **Warning for AWS users**

    If you are storing a multi-line secret in AWS Secrets Manager:

    1. Add your key and value to the **Key/value** tab of the **Secret value** section when storing your secret.
    2. Click the **Plaintext** tab.
    3. Replace any whitespace characters before and after `-----` with `\n`. Do not remove whitespace characters in the `BEGIN/END RSA PRIVATE KEY` parts.

    For example: `{"dwh-bash-private-key":"-----BEGIN RSA PRIVATE KEY-----\nline1\nline2\nline3\n-----END RSA PRIVATE KEY-----"}`

    Alternatively, you can run the following code in your terminal, replacing values where appropriate:

    ```
    PEM_CONTENT=$(awk '{printf "%s\\n", $0}' /path/to/your/file.pem)

    aws secretsmanager create-secret \
      --name "MyKeyValueSecretWithPem" \
      --description "Secret with PEM file content" \
      --secret-string "{\"pem\":\"$PEM_CONTENT\"}"
    ```
  </Warning>

  <Warning>
    **Warning for Azure users**

    Do not store multi-line secrets via the Azure Key Vault GUI, as newlines may be stripped. Instead, use the Azure CLI depending on your use case. Read [Store a multi-line secret in Azure Key Vault](https://learn.microsoft.com/en-us/azure/key-vault/secrets/multiline-secrets) to work around this issue.

    The following CLI command will maintain newlines:

    `az keyvault secret set --vault-name <vault-name> --name <secret-name> --file <key-file-name>`
  </Warning>
</ResponseField>

{/* <!-- param-start:[passphrase] | warehouses: [snowflake] --> */}

<ResponseField name="Passphrase" type="drop-down">
  Use the drop-down menu to select the corresponding secret definition that denotes the value of your passphrase.

  If your private key is passphrase protected, you will also need to add a secret to store the passphrase. Read [Using Snowflake key-pair authentication](/docs/administration/snowflake-key-pair-authentication) to learn how to store the Snowflake private key using a secret.
</ResponseField>

{/* <!-- param-start:[connectionOptions] | warehouses: [snowflake, databricks, redshift] --> */}

<ResponseField name="Connection Options" type="column editor" required>
  * **Parameter:** A JDBC parameter supported by the database driver. Consult the specific database documentation for more details.
  * **Value:** A value for the given parameter.

  Click the **Text Mode** toggle at the bottom of the **Connection Options** dialog to open a multi-line editor that lets you add items in a single block. For more information, read [Text mode](/docs/guides/components-overview#component-properties).

  To use [grid variables](/docs/guides/grid-variables), select the **Use Grid Variable** checkbox at the bottom of the **Connection Options** dialog.
</ResponseField>

<Warning>
  For this component to work with a Microsoft SQL Server database connection, you *must* set the connection option `trustServerCertificate` to `true`.

  If you're using certified SSL keys, you *don't* need this connection option to be set. Read [SqlConnectionStringBuilder.TrustServerCertificate Property](https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnectionstringbuilder.trustservercertificate?view=net-9.0-pp) to learn more.
</Warning>

<ResponseField name="SSH Tunnel" type="drop-down" required>
  Select an SSH Tunnel from the list of [Network](/docs/guides/networks) items. For detailed usage instructions, read the [SSH Tunneling](/docs/security/ssh-tunnelling#how-to-use-it) documentation.

  <Note>
    If selected, the **Connection URL** will be the data source that your secure tunnel connects to.
  </Note>
</ResponseField>

### Configure

<ResponseField name="Mode" type="drop-down" required>
  * **Basic:** This mode will build a query for you using settings from the **Schema**, **Data Source**, **Data Selection**, **Data Source Filter**, **Combine Filters**, and **Limit** parameters. In most cases, this mode will be sufficient.
  * **Advanced:** This mode will require you to write an SQL-like query to call data from the service you're connecting to. The available fields and their descriptions are documented in the documentation specific to the database product.

  <Note>
    While the query is exposed in an SQL-like language, the exact semantics can be surprising, for example, filtering on a column can return more data than not filtering on it. This is an impossible scenario with regular SQL.
  </Note>
</ResponseField>

{/* <!-- param-start:[sqlQuery] | warehouses: [snowflake, databricks, redshift] --> */}

<ResponseField name="SQL Query" type="code editor" required>
  This is an SQL-like SELECT query, written in the SQL accepted by your cloud data warehouse. Treat collections as table names, and fields as columns. Only available in **Advanced** mode.

  * [Snowflake](https://docs.snowflake.com/en/sql-reference/sql/select)
  * [Databricks](https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-qry-select.html)
  * [Amazon Redshift](https://docs.aws.amazon.com/redshift/latest/dg/r_SELECT_synopsis.html)

  For detailed information about tables and views for this connector, read the section about the data model, found below.
</ResponseField>

{/* <!-- param-start:[dataSource] | warehouses: [snowflake, databricks, redshift] --> */}

<ResponseField name="Data Source" type="drop-down" required>
  Select a single data source to be extracted from the source system and loaded into a table in the destination. The source system defines the data sources available. Use multiple components to load multiple data sources.

  For detailed information about tables and views for this connector, read the section about the data model, found below.
</ResponseField>

{/* <!-- param-start:[dataSelection] | warehouses: [snowflake, databricks, redshift] --> */}

<ResponseField name="Data Selection" type="dual listbox" required>
  Choose one or more columns to return from the query. The columns available are dependent upon the data source selected. Move columns left-to-right to include in the query.

  To use [grid variables](/docs/guides/grid-variables), select the **Use Grid Variable** checkbox at the bottom of the **Data Selection** dialog.
</ResponseField>

{/* <!-- param-start:[dataSourceFilter] | warehouses: [snowflake, databricks, redshift] --> */}

<ResponseField name="Data Source Filter" type="column editor" required>
  Define one or more filter conditions that each row of data must meet to be included in the load.

  * **Input Column:** Select an 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" and "Less 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, meaning that it is likely that only a subset of the above comparators will be available to choose from.
  * **Value:** The value to be compared.

  Click the **Text Mode** toggle at the bottom of the **Connection Options** dialog to open a multi-line editor that lets you add items in a single block. For more information, read [Text mode](/docs/guides/components-overview#component-properties).
</ResponseField>

{/* <!-- param-start:[combineFilters] | warehouses: [snowflake, databricks, redshift] --> */}

<ResponseField name="Combine Filters" type="drop-down" required>
  The data source filters you have defined can be combined using either **And** or **Or** logic. If **And**, then all filter conditions must be satisfied to load the data row. If **Or**, then only a single filter condition must be satisfied. The default is **And**.

  If you have only one filter, or no filters, this parameter is essentially ignored.
</ResponseField>

{/* <!-- param-start:[limit] | warehouses: [snowflake, databricks, redshift] --> */}

<ResponseField name="Limit" type="integer" required>
  Set a numeric value to limit the number of rows that are loaded. The default is `100`. To load all rows from your data source, delete the default `100` and leave the field empty (i.e. do not set a limit).
</ResponseField>

### Destination

Select your cloud data warehouse.

<Tabs>
  <Tab title="Snowflake">
    <ResponseField name="Type" type="drop-down" required>
      * **Standard:** The data will be staged in your storage location before being loaded into a table. This is the only setting currently available.
    </ResponseField>

    {/* <!-- param-start:[primaryKeys] | warehouses: [snowflake] --> */}

    <ResponseField name="Primary Keys" type="dual listbox">
      Select one or more columns to be designated as the table's primary key.
    </ResponseField>

    {/* <!-- param-start:[warehouse, warehouse1] | warehouses: [snowflake] --> */}

    <ResponseField name="Warehouse" type="drop-down" required>
      The Snowflake warehouse used to run the queries. The special value `[Environment Default]` uses the warehouse defined in the environment. Read [Overview of Warehouses](https://docs.snowflake.com/en/user-guide/warehouses-overview.html) to learn more.
    </ResponseField>

    {/* <!-- param-start:[database, database1] | warehouses: [snowflake] --> */}

    <ResponseField name="Database" type="drop-down" required>
      The Snowflake database. The special value `[Environment Default]` uses the database defined in the environment. Read [Databases, Tables and Views - Overview](https://docs.snowflake.com/en/guides-overview-db) to learn more.
    </ResponseField>

    {/* <!-- param-start:[schema, schema1] | warehouses: [snowflake] --> */}

    <ResponseField name="Schema" type="drop-down" required>
      The Snowflake schema. The special value `[Environment Default]` uses the schema defined in the environment. Read [Database, Schema, and Share DDL](https://docs.snowflake.com/en/sql-reference/ddl-database.html) to learn more.
    </ResponseField>

    {/* <!-- param-start:[targetTable] | warehouses: [snowflake] --> */}

    <ResponseField name="Target Table" type="string" required>
      The name of the table to be created in your Snowflake database. This table will be recreated and will drop any existing table of the same name.

      You can use a [Table Input](/docs/components/table-input) component in a transformation pipeline to access and transform this data after it has been loaded.
    </ResponseField>

    {/* <!-- param-start:[stage, stage1] | warehouses: [snowflake] --> */}

    <ResponseField name="Stage" type="drop-down" required>
      Select a managed stage. The special value, \[Custom], will create a stage "on the fly" for use solely within this component.
    </ResponseField>

    {/* <!-- param-start:[stagePlatform] | warehouses: [snowflake] --> */}

    <ResponseField name="Stage Platform" type="drop-down" required>
      Choose where the data is staged before being loaded into your Snowflake table using the drop-down menu.

      * **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 **Storage Integration** and **GCS Staging Area** properties, allowing users to specify a custom staging area within Google Cloud Storage.
      * **Snowflake Managed:** 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. This is the default setting.
    </ResponseField>

    {/* <!-- param-start:[stageAuthentication, stageAuthentication1] | warehouses: [snowflake] --> */}

    <ResponseField name="Stage Authentication" type="drop-down" required>
      Select an authentication method for data staging. Only available when **Stage Platform** is set to either **Existing Amazon S3 Location** or **Existing Azure Blob Storage Location**.

      * **Credentials:** Uses the credentials configured in the environment. If no credentials have been configured, an error will occur.
      * **Storage Integration:** Use a Snowflake storage integration to authentication data staging.
    </ResponseField>

    {/* <!-- param-start:[storageIntegration, storageIntegration1] | warehouses: [snowflake] --> */}

    <ResponseField name="Storage Integration" type="drop-down" required>
      Select a Snowflake storage integration from the drop-down list. Storage integrations are required to permit Snowflake to read data from and write to your cloud storage location and must be [set up in advance of selection](https://docs.snowflake.com/en/sql-reference/sql/create-storage-integration).
    </ResponseField>

    {/* <!-- param-start:[s3StagingArea] | warehouses: [snowflake] --> */}

    <ResponseField name="S3 Staging Area" type="drop-down" required>
      Select an S3 bucket for temporary storage. Ensure your access credentials have S3 access and permission to write to the bucket. The temporary objects created in this bucket will be removed again after the load completes.
    </ResponseField>

    {/* <!-- param-start:[storageAccount] | warehouses: [snowflake] --> */}

    <ResponseField name="Storage Account" type="drop-down" required>
      Select a storage account with your desired blob container to be used for staging the data. For more information, read [Storage account overview](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview).
    </ResponseField>

    {/* <!-- param-start:[blobContainer] | warehouses: [snowflake] --> */}

    <ResponseField name="Blob Container" type="drop-down" required>
      Select a Blob container to be used for staging the data. For more information, read [Introduction to Azure Blob storage](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction).
    </ResponseField>

    {/* <!-- param-start:[gcsStagingArea] | warehouses: [snowflake] --> */}

    <ResponseField name="GCS Staging Area" type="drop-down" required>
      The URL and path of the target Google Cloud Storage bucket to be used for staging the queried data.
    </ResponseField>
  </Tab>

  <Tab title="Databricks">
    <ResponseField name="Catalog" type="drop-down" required>
      Select a [Databricks Unity Catalog](https://docs.databricks.com/en/data-governance/unity-catalog/index.html). The special value `[Environment Default]` uses the catalog defined in the environment. Selecting a catalog will determine which databases are available in the next parameter.
    </ResponseField>

    {/* <!-- param-start:[schema2, database2] | warehouses: [databricks] --> */}

    <ResponseField name="Schema (Database)" type="drop-down" required>
      The Databricks schema. The special value `[Environment Default]` uses the schema defined in the environment. Read [Create and manage schemas](https://docs.databricks.com/en/data-governance/unity-catalog/create-schemas.html) to learn more.
    </ResponseField>

    {/* <!-- param-start:[table] | warehouses: [databricks] --> */}

    <ResponseField name="Table" type="string" required>
      The name of the table to be created in your Databricks schema. This table will be recreated and will drop any existing table of the same name.

      You can use a [Table Input](/docs/components/table-input) component in a transformation pipeline to access and transform this data after it has been loaded.
    </ResponseField>

    {/* <!-- param-start:[stagePlatform1] | warehouses: [databricks] --> */}

    <ResponseField name="Stage Platform" type="drop-down" required>
      Choose where the data is staged before being loaded into your Databricks table using the drop-down menu.

      * **AWS S3:** Lets users specify a custom staging area on Amazon S3.
      * **Azure Blob:** Lets users specify a custom staging area on Azure Blob storage.
      * **Personal Staging (deprecated):** Uses a Databricks personal staging location. This option has been deprecated by Databricks.
      * **Volume:** Use a pre-existing [Databricks volume](https://docs.databricks.com/en/sql/language-manual/sql-ref-volumes.html) to stage your data. Only external volumes are available.
    </ResponseField>

    {/* <!-- param-start:[s3StagingArea] | warehouses: [databricks] --> */}

    <ResponseField name="S3 Staging Area" type="drop-down" required>
      Select an S3 bucket for temporary storage. The temporary objects created in this bucket will be removed again after the load completes.
    </ResponseField>

    {/* <!-- param-start:[storageAccount] | warehouses: [databricks] --> */}

    <ResponseField name="Storage Account" type="drop-down" required>
      Select a storage account with your desired Blob container to be used for staging the data. For more information, read [Storage account overview](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview).
    </ResponseField>

    {/* <!-- param-start:[blobContainer] | warehouses: [databricks] --> */}

    <ResponseField name="Blob Container" type="drop-down" required>
      Select a Blob container to be used for staging the data. For more information, read [Introduction to Azure Blob storage](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction).
    </ResponseField>

    {/* <!-- param-start:[stageVolume] | warehouses: [databricks] --> */}

    <ResponseField name="Volume" type="drop-down" required>
      Select a [Databricks volume](https://docs.databricks.com/en/sql/language-manual/sql-ref-volumes.html).
    </ResponseField>
  </Tab>

  <Tab title="Amazon Redshift">
    <ResponseField name="Type" type="drop-down" required>
      * **Standard:** The data will be staged in your storage location before being loaded into a table. This is the only setting currently available.
    </ResponseField>

    {/* <!-- param-start:[schema3] | warehouses: [redshift] --> */}

    <ResponseField name="Schema" type="drop-down" required>
      Select the table schema. The special value `[Environment Default]` uses the schema defined in the environment. For more information on using multiple schemas, read [Schemas](https://docs.aws.amazon.com/redshift/latest/dg/r_Schemas_and_tables.html).
    </ResponseField>

    {/* <!-- param-start:[targetTable1] | warehouses: [redshift] --> */}

    <ResponseField name="Target Table" type="string" required>
      The name of the table to be created in your Amazon Redshift schema. This table will be recreated and will drop any existing table of the same name.

      You can use a [Table Input](/docs/components/table-input) component in a transformation pipeline to access and transform this data after it has been loaded.
    </ResponseField>

    {/* <!-- param-start:[s3StagingArea1] | warehouses: [redshift] --> */}

    <ResponseField name="S3 Staging Area" type="S3 bucket" required>
      Select an S3 bucket for temporary storage. The temporary objects created in this bucket will be removed again after the load completes.
    </ResponseField>

    {/* <!-- param-start:[distributionStyle] | warehouses: [redshift] --> */}

    <ResponseField name="Distribution Style" type="drop-down" required>
      Table distribution is critical to good performance. Read the [Distribution styles](https://docs.aws.amazon.com/redshift/latest/dg/c_choosing_dist_sort.html) documentation for more information.

      * **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.
    </ResponseField>

    {/* <!-- param-start:[distributionKey] | warehouses: [redshift] --> */}

    <ResponseField name="Distribution Key" type="drop-down" required>
      This parameter is only available when **Distribution Style** is set to **Key**. Select a column from the input that should be set as the table's distribution key. This column should be chosen carefully, as it will determine how the data is distributed around the Redshift cluster.
    </ResponseField>

    {/* <!-- param-start:[sortKey] | warehouses: [redshift] --> */}

    <ResponseField name="Sort Key" type="dual listbox" required>
      Sort keys are critical to good performance. Read [Working with sort keys](https://docs.aws.amazon.com/redshift/latest/dg/t_Sorting_data.html) for more information.

      This property is optional, and lets you specify one or more columns from the input that should be set as the table's sort key.
    </ResponseField>

    {/* <!-- param-start:[sortKeyOptions] | warehouses: [redshift] --> */}

    <ResponseField name="Sort Key Options" type="drop-down" required>
      Decide whether the sort key is of a compound or interleaved variety.
    </ResponseField>

    {/* <!-- param-start:[primaryKey] | warehouses: [redshift] --> */}

    <ResponseField name="Primary Key" type="dual listbox" required>
      Select one or more columns to be designated as the table's primary key.
    </ResponseField>
  </Tab>
</Tabs>

### Advanced Settings

<Tabs>
  <Tab title="Snowflake">
    <ResponseField name="Load Options" type="multiple drop-downs" required>
      * **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 existing table will be used. Default is **On**.
      * **File Prefix:** Give staged file names a prefix of your choice. Default is empty (no prefix).
      * **Trim String Columns:** Remove leading and trailing characters from a string column. Default is **On**.
      * **Compression Type:** Set the compression type to either **gzip** (default) or **None**.
    </ResponseField>
  </Tab>

  <Tab title="Databricks">
    <ResponseField name="Load Options" type="multiple drop-downs" required>
      * **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 existing table will be used. Default is **On**.
      * **File Prefix:** Give staged file names a prefix of your choice. Default is empty (no prefix).
      * **Compression Type:** Set the compression type to either **gzip** (default) or **None**.
    </ResponseField>
  </Tab>

  <Tab title="Amazon Redshift">
    <ResponseField name="Load Options" type="multiple drop-downs" required>
      * [Comp Update:](https://docs.aws.amazon.com/redshift/latest/dg/copy-parameters-data-load.html#copy-compupdate) Apply automatic compression to the target table. Default is On.
      * [Stat Update:](https://docs.aws.amazon.com/redshift/latest/dg/copy-parameters-data-load.html#copy-statupdate) 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 (default) or None.
    </ResponseField>
  </Tab>
</Tabs>

<ResponseField name="Encryption" type="drop-down" required>
  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)](https://aws.amazon.com/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)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingServerSideEncryption.html) to learn more.
</ResponseField>

{/* <!-- param-start:[kmsKeyId] | warehouses: [snowflake, databricks, redshift] --> */}

<ResponseField name="KMS Key ID" type="drop-down" required>
  The ID of the KMS encryption key you have chosen to use in the **Encryption** property.
</ResponseField>

{/* <!-- param-start:[concurrency, concurrencyValue] | warehouses: [snowflake, databricks, redshift] --> */}

<ResponseField name="Concurrency" type="integer" required>
  The number of files to create in the specified S3 bucket. The default value is 2.

  Each {m_runner} instance is limited to 20 concurrent tasks at any one time. This is regardless of the amount of resources assigned to the agent instance. As such, a high level of concurrency in your pipelines would result in tasks being queued and would result in the overall pipeline execution taking longer. Read [Horizontal scaling](/docs/guides/scaling-best-practices#horizontal-scaling) for more information.

  For Amazon Redshift projects, this parameter is called `Concurrency Value` in the UI.
</ResponseField>

{/* <!-- param-start:[concurrencyMethod] | warehouses: [redshift] --> */}

<ResponseField name="Concurrency Method" type="drop-down" required>
  This parameter only applies to Amazon Redshift projects.

  * **Absolute:** Uses the absolute value set in the **Concurrency** 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 you set the **Concurrency** value to 8, then the number of files created in the staging store is 4 x 8 = 32.
</ResponseField>

{/* <!-- param-start:[fetchSize] | warehouses: [snowflake, databricks, redshift] --> */}

<ResponseField name="Fetch Size" type="integer" required>
  Optionally specify the batch size of rows to fetch at a time, for example, 500.

  When left blank, the chosen database's driver default fetch size is used.
</ResponseField>

## Database driver versions

| Database                      | Driver version                                                                                           |
| ----------------------------- | -------------------------------------------------------------------------------------------------------- |
| Amazon Redshift               | [redshift-jdbc42:2.1.0.18](https://docs.aws.amazon.com/redshift/latest/mgmt/jdbc20-download-driver.html) |
| IBM Db2 for i                 | [jt400:9.1](https://mvnrepository.com/artifact/net.sf.jt400/jt400/9.1)                                   |
| MariaDB                       | [mariadb-java-client:2.7.7](https://mariadb.com/kb/en/mariadb-connector-j-2-7-7-release-notes/)          |
| Microsoft SQL Server          | [jtds:1.3.1](https://mvnrepository.com/artifact/net.sourceforge.jtds/jtds/1.3.1)                         |
| Oracle                        | [ojdbc8:21.9.0.0](https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc8/21.9.0.0)           |
| PostgreSQL                    | [postgresql:42.5.5](https://mvnrepository.com/artifact/org.postgresql/postgresql/42.5.5)                 |
| Sybase ASE                    | [jtds:1.3.1](https://mvnrepository.com/artifact/net.sourceforge.jtds/jtds/1.3.1)                         |
| Snowflake                     | [snowflake-jdbc:3.17.0](https://docs.snowflake.com/en/developer-guide/jdbc/jdbc-download)                |
| SQL Server (Microsoft driver) | [12.8.1.jre11](https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc/12.8.1.jre11)       |

***

<Note>
  Due to licensing restrictions, this component uses the MariaDB driver when interacting with MySQL databases in Full SaaS deployments. For customers using a Hybrid SaaS deployment, the native MySQL driver can be used to interact directly with MySQL databases.
</Note>
