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(string $id): DataTable
Parameters
Parameter | Type | Description |
---|---|---|
$id | string | The id of the Data Table to get |
returns | DataTable | The requested Data Table |
Example
<?php
/*
* This example demonstrates getting a Data Table's metadata by ID
* and printing out the table's name and columns
*/
require_once(__DIR__ . '/../vendor/autoload.php');
use Catalytic\SDK\CatalyticClient;
$catalytic = new CatalyticClient();
$dataTable = $catalytic->dataTables()->get('7e77254c-d2d6-4271-965a-98390aefa50a');
echo $dataTable->getName() . ":" . PHP_EOL;
foreach ($dataTable->getColumns() as $column) {
echo $column->getName() . " " . $column->getType() . PHP_EOL;
}
Updated almost 3 years ago