Get a Data Table
Get metadata for a Data Table by ID, returning a Data Table Entity including the Data Table's Name
, Columns
, Type
, and more.
Permissions Required
You must have View permissions to the data table for this request to succeed
Method Signature
DataTable Get(Guid id);
async Task<DataTable> GetAsync(Guid id);
Parameters
Parameter | Type | Description |
---|---|---|
id | Guid | The id of the Data Table to get |
returns | DataTable | The requested Data Table |
DataTable Get(string id);
async Task<DataTable> GetAsync(string id);
Parameter | Type | Description |
---|---|---|
id | string | The id of the DataTable to get |
returns | DataTable | The requested Data Table |
Example
/*
* This example demonstrates getting a Data Table's metadata by ID
* and printing out the table's name and columns
*/
using Catalytic.Sdk.Entities;
namespace Catalytic.Sdk.Examples
{
class Program
{
static void Main(string[] args)
{
var catalytic = new Catalytic.Sdk.CatalyticClient(AccessToken.Default);
var table = catalytic.DataTables.Get(
"e6df431b-1041-4326-89e5-1e14caa6a08f");
Console.WriteLine($"${table.Name}:");
foreach (var column in table.Columns)
{
Console.WriteLine($"{column.Name} ({column.Type})");
}
}
}
}
Updated over 2 years ago