Tabular

This page describes how to create and maintain connections to your Tabular catalog.

Before you can write your data to Tabular, you should first establish a connection to your Tabular catalog.

Create a Tabular connection

Simple example

CREATE TABULAR CONNECTION my_tabular_connection
    TOKEN = '...'
    WAREHOUSE = '...'
    DEFAULT_STORAGE_CONNECTION = my_s3_storage_connection
    DEFAULT_STORAGE_LOCATION = 's3://sqlake/my_tabular_catalog_table_files/';

Full example

CREATE TABULAR CONNECTION my_tabular_connection
    TOKEN = '...'
    WAREHOUSE = '...'
    DEFAULT_STORAGE_CONNECTION = my_s3_storage_connection
    DEFAULT_STORAGE_LOCATION = 's3://sqlake/my_tabular_catalog_table_files/'
    DATABASE_DISPLAY_FILTERS = ('sales_db')
    COMMENT = 'Connection to sales database';

Alter a Tabular connection

Certain connection options are considered mutable, meaning that in some cases, you can run a SQL command to alter an existing Tabular connection rather than creating a new one.

For example, take the Tabular connection we created previously:

CREATE TABULAR CONNECTION my_tabular_connection
    TOKEN = '...'
    WAREHOUSE = '...'
    DEFAULT_STORAGE_CONNECTION = my_s3_storage_connection
    DEFAULT_STORAGE_LOCATION = 's3://sqlake/my_tabular_catalog_table_files/'
    DATABASE_DISPLAY_FILTERS = ('sales_db')
    COMMENT = 'Connection to sales database';

To change the database you are connecting to but keep everything else the same without having to create an entirely new connection, you can run the following command:

ALTER TABULAR CONNECTION my_tabular_connection
    SET = DATABASE_DISPLAY_FILTERS = ('sales_usa_db')

Drop a Tabular connection

If you no longer need a connection, you can easily drop it with the following SQL command:

DROP CONNECTION my_tabular_connection; 

However, note that if there are existing tables or jobs that are dependent upon the connection in question, the connection cannot be deleted.


Learn More

Last updated