Get a Data Table

Get metadata for a Data Table by ID.

šŸ‘

Permissions Required

You must have View permissions to the data table for this request to succeed

Method Signature

DataTable get(String id);

Parameters

ParameterTypeDescription
idStringThe id of the DataTable to get
returnsDataTableThe requested Data Table
/*
 * This example demonstrates getting a Data Table's metadata by ID
 * and printing out the table's name and columns
 */

import org.catalytic.sdk.Client;
import org.catalytic.sdk.entities.DataTable;

public class Program {
  
    public static void main(String[] args) throws Exception {
      
      	// Create and initialize Catalytic SDK Client
        CatalyticClient catalytic = new CatalyticClient();
      
      	// Get a specific Data Table by id
        DataTable dataTable = catalytic.dataTables().get("e6df431b-1041-4326-89e5-1e14caa6a08f");
      
      	for (DataTableColumn column : dataTable.getColumns) {
            System.out.println(column.getName() + " " + column.getType()); 
        }
    }
}