Query metadata from a database
You can use the Query metadata from a database step to retrieve metadata from six different JDBC metadata discovery types. This is most useful with metadata injection.
Catalog
Gets a list of catalogs from the database server. If the database does not support catalogs, this discovery type returns no rows.
Schemas
Gets a list of schemas from the database server. If the database does not support schemas, this discovery type returns no rows.
Tables
Gets a list of tables from the database.
Columns
Gets a list of columns from the database.
Primary keys
Gets a list of primary keys from the database.
Foreign keys
Gets a list of foreign keys from the database.
General
Step name: Specify the unique name of the Query metadata from a database step on the canvas. You can customize the name or leave it as the default.
Connection tab

Use the Connection tab to connect to a JDBC database.
Select connection
Select a database connection from the list. You can also select New (create a connection), Edit (edit the selected connection), or Wizard (open the database connection wizard).
From field
Select a connection from fields available in the transformation data stream.
Remove input fields
If you use From field, select Remove input fields to omit the incoming connection fields from the output stream.
Input tab

Use the Input tab to filter results with values for each argument.
You can specify argument values in either of these ways:
Enter arguments: Enter a value for an argument.
From fields: Select an argument value from fields available in the transformation stream.
Enter arguments
Use this option to add values that filter the results.
%matches 0 or more characters._matches exactly 1 character.
Schemas
Catalog
Name of the catalog to limit results. If empty, schemas from all catalogs are returned.
Schemas
Schema pattern
Pattern to limit schemas. If empty, schemas from all catalogs are returned.
Tables
Catalog
Name of the catalog to limit results. If empty, schemas from all catalogs are returned.
Tables
Schema pattern
Pattern to limit schemas. If empty, tables from all schemas are returned.
Tables
Table pattern
Pattern to limit tables. If empty, all tables are returned.
Tables
Table types
Comma-delimited list of table types to limit results.
Columns
Catalog
Name of the catalog to limit results. If empty, columns from all catalogs are returned.
Columns
Schema pattern
Pattern to limit schemas. If empty, columns from all schemas are returned.
Columns
Table pattern
Pattern to limit tables. This usually follows the database LIKE syntax (may vary by JDBC driver).
Columns
Column pattern
Pattern to limit columns. If empty, all columns are returned.
Primary keys
Catalog
Name of the catalog to limit results. If empty, schemas from all catalogs are returned.
Primary keys
Schema
Name of the schema to limit results.
Primary keys
Table
Name of the table to limit results.
Foreign keys
Catalog
Name of the catalog to limit results. If empty, schemas from all catalogs are returned.
Foreign keys
Schema
Name of the schema to limit results.
Foreign keys
Table
Name of the table to limit results.
From fields
Use this option to filter results with values from the transformation stream. Select a value in one or more of the drop-down lists.
Fields tab

Use the Fields tab to display the output fields for the selected discovery type.
Select the discovery type.
Select Get fields.
(Optional) Use Rename to to rename fields. Renamed fields are available to downstream steps.
Metadata injection support
All fields of this step support metadata injection. You can use this step with ETL metadata injection to pass metadata to your transformation at runtime.
Last updated
Was this helpful?

