> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/pdia-data-integration/10.2-data-integration/pdi-transformation-steps-reference-overview/query-metadata-from-a-database-article/options-query-from-database/fields-tab.md).

# Fields tab

![Query metadata from Database step Fields tab](/files/bYdmSee8Y4NqYZKkS40S)

You use the **Fields** tab to display all the fields within the JDBC discovery type. Click the **Get fields** button to display all the fields associated with each discovery type in the **Field name** column.

**Optional**: Use the **Rename to** column to rename the field names. The new names will be available in any downstream transformation step.

| JDBC Metadata Discovery Type   | Field name                                                                         | Description                                       |
| ------------------------------ | ---------------------------------------------------------------------------------- | ------------------------------------------------- |
| **Catalog**                    | `catalog`                                                                          | Name of the database catalog                      |
| **Schemas**                    | `catalog`                                                                          | Name of the database catalog                      |
| `schema`                       | Name of the database schema                                                        |                                                   |
| **Tables**                     | `catalog`                                                                          | Name of the database catalog                      |
| `schema`                       | Name of the database schema                                                        |                                                   |
| `ref_generation`               | Reference generation                                                               |                                                   |
| `remarks`                      | Remarks                                                                            |                                                   |
| `self_referencing_column_name` | A column that refers to another column in the same table                           |                                                   |
| `table_name`                   | Name of the database table                                                         |                                                   |
| `table_type`                   | Type of the database table                                                         |                                                   |
| `type_catalog`                 | Type catalog                                                                       |                                                   |
| `type_name`                    | Type name                                                                          |                                                   |
| `type_schema`                  | Type schema                                                                        |                                                   |
| **Columns**                    | `buffer_length`                                                                    | Length of the buffer for specific data types      |
| `char_octet_length`            | Maximum length, in bytes, for binary data, character data, or text and image data. |                                                   |
| `column_default`               | Default value of the column                                                        |                                                   |
| `column_name`                  | Name of the column                                                                 |                                                   |
| `column_size`                  | Number of characters or digits of the data                                         |                                                   |
| `data_type`                    | Data type of the column                                                            |                                                   |
| `decimal_digits`               | Number of digits after the decimal point                                           |                                                   |
| `is_autoincrement`             | Whether the column implements automatic increments                                 |                                                   |
| `is_generated_column`          | Whether the column is generated                                                    |                                                   |
| `is_nullable`                  | Whether the column allows null values.                                             |                                                   |
| `nullable`                     | Column is nullable                                                                 |                                                   |
| `number_precision_radix`       | The base sytsem used for numeric precision (usually base 2 or 10)                  |                                                   |
| `ordinal_position`             | The location of the column ordering within a table or query output                 |                                                   |
| `pentaho_data_type`            | Maps to the custom Pentaho data type                                               |                                                   |
| `pentaho_data_type_int`        | Maps to the custom Pentaho integer data type                                       |                                                   |
| `remarks`                      | Remarks                                                                            |                                                   |
| `schema`                       | Name of the database schema                                                        |                                                   |
| `scope_catalog`                | Catalog that lies within a scope                                                   |                                                   |
| `scope_schema`                 | Schema that lies within a scope                                                    |                                                   |
| `scope_table`                  | Table that lies within a scope.                                                    |                                                   |
| `source_data_type`             | Data type within a source                                                          |                                                   |
| `sql_data_type`                | SQL data type for a column                                                         |                                                   |
| `sql_datetime_sub`             | SQL date/time sub                                                                  |                                                   |
| `table_name`                   | Name of a table in the database                                                    |                                                   |
| `type_name`                    | Name of a type in a database                                                       |                                                   |
| **Primary Keys**               | `catalog`                                                                          | Name of the database catalog                      |
| `column_name`                  | Name of the column                                                                 |                                                   |
| `key_sequence`                 | Sequence of the primary key                                                        |                                                   |
| `pk_name`                      | Name of the primary key                                                            |                                                   |
| `schema`                       | Name of the database schema                                                        |                                                   |
| `table_name`                   | Name of a table in the database                                                    |                                                   |
| **Foreign Keys**               | `deferrability`                                                                    | Whether the primary key have deferred constraints |
| `delete_rule`                  | Delete rule for primary key                                                        |                                                   |
| `fk_column_name`               | Name of the foreign key column                                                     |                                                   |
| `fk_name`                      | Name of the foreign key                                                            |                                                   |
| `fk_table_schema`              | Schema in the foreign key table                                                    |                                                   |
| `key_sequence`                 | Sequence of the foreign key                                                        |                                                   |
| `pk_column_name`               | Name of the column in the primary key                                              |                                                   |
| `pk_name`                      | Name of the primary key                                                            |                                                   |
| `pk_table_catalog`             | Name of the catalog to which the primary key's table belongs                       |                                                   |
| `pk_table_name`                | Name of the table in the primary key                                               |                                                   |
| `pk_table_schema`              | Schema in the primary key table                                                    |                                                   |
| `update_rule`                  | Update rule for primary key                                                        |                                                   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pentaho.com/pdia-data-integration/10.2-data-integration/pdi-transformation-steps-reference-overview/query-metadata-from-a-database-article/options-query-from-database/fields-tab.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
