JDBC Table Metadata to Grid
The JDBC Table Metadata to Grid component takes the metadata from a JDBC table and uses this data to populate a grid variable.
If the target table doesn't exist, the component function is dependent on the database type. Sybase and MySQL return a fail. Other drivers pass with an empty grid returned.
Note
In Snowflake, unquoted object identifiers are resolved as uppercase. Object identifiers encased in double quotes are resolved exactly as entered.
- For example,
tablename
andtableNAME
both resolve toTABLENAME
. - Conversely,
"tablename"
would resolve totablename
.
This means that a table whose name is all uppercase will resolve to uppercase with or without double quotes. It may be preferable to use table names in all uppercase when working with Snowflake.
Read Identifier Resolution for more information.
Properties
Name
= string
A human-readable name for the component.
Database Type
= drop-down
Select the database type. Choose from:
- Amazon Redshift
- IBM DB2 for i
- MariaDB
- Microsoft SQL Server
- Oracle
- PostgreSQL
- Snowflake
- SQL Server (Microsoft Driver)
- Sybase ASE
Connection URL
= string
The URL for your chosen JDBC database.
Although many parameters and options can be added to the end of the URL, it's generally easier to add them in the Connection Options property, documented below.
Authentication Type
= drop-down
When Database Type
is set to Snowflake, choose whether to use a username and password or a key pair to authenticate. The default is key pair.
Username
= string (optional)
A valid username for the database connection.
Password
= string (optional)
Available when Authentication Type
is set to Username and password.
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 for details about creating a secret definition.
Private Key
= drop-down
When Database Type
is set to Snowflake, use the drop-down menu to select the corresponding secret definition that denotes the value of your private key.
Read Using Snowflake key-pair authentication to learn how to store the Snowflake private key using a secret.
Warning
For AWS users:
If you're storing a multi-line secret in AWS Secrets Manager:
- Add your key and value to the Key/value tab of the Secret value section when storing your secret.
- Click the Plaintext tab.
- Replace any whitespace characters before and after
-----
with\n
. Do not remove whitespace characters in theBEGIN/END RSA PRIVATE KEY
parts.
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
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 to work around this issue.
The following CLI command will maintain newlines:
az keyvault secret set --vault-name <vault-name> --name <secet-name> --file <key-file-name>
Require Passphrase
= boolean
Choose whether to require a passphrase as part of using key pair authentication. Default is false.
Passphrase
= drop-down
Available when Require Passphrase
is set to Yes.
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 to learn how to store the Snowflake private key using a secret.
Connection Options
= column editor (optional)
- Parameter: A JDBC parameter supported by the database driver. Manual setup is not usually required, since sensible defaults are assumed.
- Value: A value for the given parameter.
To use grid variables, tick the Use Grid Variable checkbox at the bottom of the Connection Options dialog.
Schema
= drop-down (optional)
Select a table schema.
In Databricks, this property is known as Schema (Database)
.
Table
= drop-down
Select the table to pull metadata from.
Grid Variable
= drop-down
Drop-down list of grid variables. To learn more, read Grid variables.
Grid Variable Mapping
= multiple drop-downs
Map each column in the grid variable to a particular "type" of metadata by selecting from the available drop-down menus.
To use grid variables, tick the Use Grid Variable checkbox at the bottom of the Grid Variable Mapping dialog.
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.
Snowflake | Databricks | Amazon Redshift |
---|---|---|
✅ | ✅ | ✅ |