--- title: "Get Column Metadata" url: https://docs.catalyst.zoho.com/en/sdk/android/v2/cloud-scale/data-store/get-column-metadata/ description: "You can obtain the metadata of all columns or single specific column of a Data Store table of the given instance by its ID or name." last_updated: 2025-11-19T15:07:41Z service: Cloud Scale type: general related_links: - name: "Data Store" url: /en/cloud-scale/help/data-store/introduction - name: "Columns" url: /en/cloud-scale/help/data-store/columns - name: "Get Metadata of Coulumns - API" url: /en/api/code-reference/cloud-scale/data-store/get-all-columns-metadata/#GetAllColumnsMetadata --- # Get Column Metadata ### Get the Metadata of a Specific Column You can obtain the metadata of a single specific column of a [Data Store](https://docs.catalyst.zoho.com/en/cloud-scale/help/data-store/introduction) table of the given instance by calling the `getColumn()` method. If the operation is successful, this method can return the metadata of the column, such as its data type, default value, or maximum length, or whether it is read only, unique, or mandatory. The metadata of a specific column can be fetched in two different ways. The `<TABLE_INSTANCE>` used in both the methods is the instance defined in the [Table Instance page](https://docs.catalyst.zoho.com/en/sdk/android/v2/cloud-scale/data-store/create-table-instance). #### i. Get a Column by its ID You can retrieve a specific column's metadata by passing the column ID as the argument to the `getColumn()` method, as shown in the code syntax below: ```bash <TABLE_INSTANCE>.getColumn( id: Long, success: (ZCatalystColumn) → Unit, failure: ((ZCatalystException) → Unit)? ): ZCatalystRequest<ZCatalystResponse<ZCatalystColumn>>? ``` **Parameters**: * `id`: The [unique Column ID](https://docs.catalyst.zoho.com/en/cloud-scale/help/data-store/columns/#column-characteristics) of the particular column that needs to be retrieved A sample code snippet is shown below: ```bash val table = ZCatalystApp.getInstance().getDataStoreInstance().getTableInstance("EmployeeDetails") //Replace this with your table name table.getColumn(2823000000017733, //Replace this with your Column ID { column -> println("Get Column success") println("The name of the column is: ${column.name}") }, { exception -> println("Get column failed! $exception") }) ``` #### ii. Get a Column by its Name You can retrieve a specific column's metadata by passing the column's name as the argument to the `getColumn()` method, as shown in the code syntax below: ```bash <TABLE_INSTANCE>.getColumn( name: String, success: (ZCatalystColumn) → Unit, failure: ((ZCatalystException) → Unit)? ): ZCatalystRequest<ZCatalystResponse<ZCatalystColumn>>? ``` **Parameters**: * `name`: The name of the particular column that needs to be retrieved A sample code snippet is shown below: ```bash val table = ZCatalystApp.getInstance().getDataStoreInstance().getTableInstance("EmployeeDetails") //Replace this with your table name table.getColumn("DepartmentName", //Replace this with your column name { column -> println("Get Column Success") println("The ID of the column is: ${column.id}") }, { exception -> println("Get column failed! $exception") }) ``` ### Get the Metadata of all Columns You can retrieve the metadata of all the columns of a table of the given instance, using the `getColumns()` method, as shown in the code syntax below. If the operation is successful, this method can return the metadata of all the columns of the specific table. The `<TABLE_INSTANCE>` used in the code below is the instance defined in the [Table Instance page](https://docs.catalyst.zoho.com/en/sdk/android/v2/cloud-scale/data-store/create-table-instance). ```bash <TABLE_INSTANCE>.getColumns( success: (List<ZCatalystColumn>) → Unit, failure: ((ZCatalystException) → Unit)? ): ZCatalystRequest<ZCatalystResponse<ArrayList<ZCatalystColumn>>>? ``` A sample code snippet is shown below: ```bash val table = ZCatalystApp.getInstance().getDataStoreInstance().getTableInstance("EmployeeDetails") //Replace this with your table name table.getColumns( { columns -> println("Get Columns success") for (column in columns) { println("${column.name}") } }, { exception -> println("Get Columns failed! $exception.") } ) ```