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

ParameterTypeDescription
idGuidThe id of the Data Table to get
returnsDataTableThe requested Data Table
DataTable Get(string id);
async Task<DataTable> GetAsync(string id);
ParameterTypeDescription
idstringThe id of the DataTable to get
returnsDataTableThe 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})");
            }
        }
    }
}