Find Data Tables

Find Data Tables by name.

πŸ‘

Permissions Required

You must have Find permissions to a matching Data Table for it to be included in the results

Method Signature

find(Filter $filter = null, string $pageToken = null, int $pageSize = null): DataTablesPage

Parameters

ParameterTypeDescription
$filterFilterThe filter criteria to search by, or null to fetch all Data Tables.
$pageTokenstringThe token of the page to fetch
$pageSizeintThe number of DataTables to return per page
returnsDataTablesPageThe requested page of Data Tables

You can search for matches among the following attributes of the Where class.

NameTypeDescription
textstringFuzzy matches the data table Name.

Example

<?php

/*
 * This example demonstrates finding all Data Tables and
 * printing their names in a list
 */

require_once(__DIR__ . '/vendor/autoload.php');

use Catalytic\SDK\CatalyticClient;
use Catalytic\SDK\Search\Where;

$catalytic = new CatalyticClient();

$where = (new Where())->text()->matches('My example table');
$results = $catalytic->dataTables()->find($where);
$dataTables = $results->getDataTables();

// Loop through all the pages of results
while (!empty($results->getNextPageToken())) {
    $results = $catalytic->dataTables()->find($where, $results->getNextPageToken());
    $dataTables = array_merge($dataTables, $results->getDataTables());
}

foreach($tables as $table) {
    echo $table->getName() . PHP_EOL;
}