# Key fields table

Enter information about the columns in the HBase table that you want to map. The names of the incoming fields must match the aliases of fields defined in the mapping. There can be fewer incoming fields than defined in the mapping. However, if there are more incoming fields than defined, then an error will occur. One of the incoming fields must match the key defined in the mapping.

A valid mapping must define metadata for the key of the source HBase table. Because no name is given to the key of an HBase table, you must specify an **Alias**.

An **Alias** is optional for non-key columns, but you must specify the **Column family** and **Column name**. If an **Alias** is not supplied, then the **Column name** is used.

You must supply **Type** information for all the fields.

**Note:** The step does not support adding new column families to an existing table.

The key fields table includes the following columns:

| Column             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **#**              | The order of the mapping operation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Alias**          | The name you want to assign to the HBase table key. This value is required for the table key column, but optional for non-key columns.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Key**            | Specify if the field is the table's key. The values are **Y** and **N**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **Column family**  | The column family in the HBase source table that the field belongs to. Non-key columns must specify a column family and column name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Column name**    | The name of the column in the HBase table.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Type**           | <p>The data type for the column.</p><p>When the <strong>Key</strong> value is set to <strong>Y</strong>, the following key column values display in the drop-down list:</p><ul><li><strong>String</strong></li><li><strong>Integer</strong></li><li><strong>UnsignedInteger</strong></li><li><strong>Long</strong></li><li><strong>UnsignedLong</strong></li><li><strong>Date</strong></li><li><strong>UnsignedDate</strong></li><li><strong>Binary</strong></li></ul><p>When the <strong>Key</strong> value is set to <strong>N</strong>, the following non-key column values display in the drop-down list:</p><ul><li><strong>String</strong></li><li><strong>Integer</strong></li><li><strong>Long</strong></li><li><strong>Float</strong></li><li><strong>Double</strong></li><li><strong>Boolean</strong></li><li><strong>Date</strong></li><li><strong>BigNumber</strong></li><li><strong>Serializable</strong></li><li><strong>Binary</strong></li></ul> |
| **Indexed values** | Comma-separated data in this field defines the values for string columns.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

To save the mapping in HBase, click \*\*Save mapping\*\*. You are prompted to correct any missing information in the mapping definition before proceeding.

* If you provided valid connection details and named the mapping, the mapping is saved to the cluster in HBase.
* If you only need the mapping locally, then the connection details and mapping name are not required and the mapping information is serialized automatically into the transformation metadata.

To delete a mapping in HBase, click **Delete mapping**. The current named mapping in the current named table is deleted from the mapping table, but the actual HBase table remains.

To partially populate the key fields table with fields that define a tuple mapping, click **Create a tuple template**. Tuple output mode inserts all the data in wide HBase rows where the number of columns may vary from row to row. It assumes that all column values are of the same type. A tuple mapping consists of the following output fields:

* KEY
* Family
* Column
* Value
* Timestamp

The type for "Family" is preconfigured to **String** and the type for "Timestamp" is preconfigured to **Long**. You must provide the types for "KEY", "Column" (column name) and "Value" (column value). The default behavior is to output all column values in all column families.


---

# Agent Instructions: 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:

```
GET https://docs.pentaho.com/pdia-data-integration/10.2-data-integration/pdi-transformation-steps-reference-overview/hbase-row-decoder-pdi/options-hbase-row-decoder-step/createedit-mappings-tab-hbase-row-decoder-step/key-fields-table-hbase-row-decoder-step.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
