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

get(id: string): Promise<DataTable>;
get(id: string, callback: (err?: Error, dataTable: DataTable) => any): void;


idstringThe id of the Data Table to get
callback(err?: Error, dataTable: DataTable) => anyOptional The callback
returnsDataTableThe requested Data Table


 * This example demonstrates getting a Data Table's metadata by ID
 * and printing out the table's name and columns
const { CatalyticClient } = require('@catalytic/sdk');

const catalytic = new CatalyticClient();

const id = 'c9f2beec-10c0-4f2f-b4e0-1d884c7e053c';
const table = await catalytic.dataTables.get(id);

table.columns.forEach(column => console.log(`${} (${column.type})`));