DictionaryLeap

Guide

A Snowflake data dictionary from your schema

A Snowflake data dictionary lists each table and view, and each column on it: the name, the data type, whether the column allows null, and any comment stored on the column. It describes structure. It does not contain the rows stored in those columns.

DictionaryLeap does not connect to Snowflake. Run one of the read-only queries below in a worksheet, save the result as a CSV with the header row, and upload that file. The upload reads table_name, column_name, and data_type. table_schema and is_nullable are used when they are present. A comment or column_comment value is stored on the column when that header is present.

The free preview shows the first 25 columns and the first glossary domain. The Dataset Pack is $49 for one table of up to 200 columns, with a flat glossary plus one domain of the hierarchy, and a glossary CSV and SKOS for that domain. The Database Pack is $249 for up to 50 tables and 2,000 columns, with the full glossary and taxonomy hierarchy, all parent and child checks, an Excel glossary sheet, a glossary CSV, and SKOS. Each pack is a one-time price for that upload. It is not a subscription, and nothing renews.

What the dictionary covers

Database and schema. INFORMATION_SCHEMA is the catalog for the database selected in the worksheet. ACCOUNT_USAGE is the account copy, so the query filters to one database.

Table or view name, and the column name. Both views include tables and views the role can see.

DATA_TYPE, the standard Snowflake type name. Length is in CHARACTER_MAXIMUM_LENGTH. Precision and scale are in NUMERIC_PRECISION and NUMERIC_SCALE. This query does not select those columns. The upload uses the type name.

IS_NULLABLE. On INFORMATION_SCHEMA.COLUMNS, Snowflake documents this as YES or NO. The ACCOUNT_USAGE page describes the same column as whether the column allows null, and it does not print those two words. The upload reads YES or NO. Any other value leaves nullability empty.

COMMENT, the comment stored on the column. It is empty when no comment was set. The query does not read row values.

What the CSV should contain

Use these header names. Letter case does not matter. A catalog file needs table_name, column_name, and data_type (or udt_name). The other columns are optional.

ColumnRequiredWhat it is
table_catalogNoDatabase name. The upload does not group tables by this column. Filter the account usage query to one database.
table_schemaNoSchema name. Keeps two tables with the same name apart.
table_nameYesTable or view name.
column_nameYesColumn name.
data_typeYesStandard Snowflake type name. udt_name is accepted only when data_type is absent.
is_nullableNoYES or NO. Other text leaves nullability empty.
commentNoColumn comment. column_comment is also accepted as the header.

How to do it

  1. Choose the database. For INFORMATION_SCHEMA, select that database in the worksheet. For ACCOUNT_USAGE, set table_catalog to the stored database name.
  2. Run one query. Run a single SELECT. Both statements read catalog views. They do not select rows from your tables.
  3. Save the CSV. Save the result as a CSV with the header row.
  4. Start the preview. Upload the file on the build page. Leave sample values off. DictionaryLeap does not connect to Snowflake.

Read-only SQL

Run one query. Save the result as a CSV with the header row. Do not include a dump of table rows.

INFORMATION_SCHEMA.COLUMNS

Select the database in the worksheet first. Each database has its own INFORMATION_SCHEMA. Snowflake documents that schema as read-only. The view returns objects the current role can access. The COLUMNS page says the view does not honor MANAGE GRANTS, so it may show less than a SHOW command run by a role with that privilege.

Snowflake stores unquoted identifiers in uppercase. The upload matches header names in any letter case. Add AND table_schema = 'PUBLIC' (use your schema name) when you want one schema. The view also has KIND, with values COLUMN, VIRTUAL_COLUMN, and PARTITION_COLUMN. This query does not filter on KIND, so virtual columns and external-table partition columns are included when the role can see them.

Current database

SELECT
  table_catalog,
  table_schema,
  table_name,
  column_name,
  data_type,
  is_nullable,
  comment
FROM information_schema.columns
WHERE table_schema <> 'INFORMATION_SCHEMA'
ORDER BY table_schema, table_name, ordinal_position;

Save the result as a CSV with the header row. Replace nothing in this statement. The worksheet database is the catalog you export.

ACCOUNT_USAGE.COLUMNS

SNOWFLAKE.ACCOUNT_USAGE.COLUMNS is one row per column in the account, including columns that have been deleted. DELETED is the deletion time. NULL means the column is not deleted. This query keeps deleted IS NULL.

Snowflake's account usage page says the SNOWFLAKE database is visible to all users, and that access to its schemas is granted by a user with the ACCOUNTADMIN role. The grant can be IMPORTED PRIVILEGES on the SNOWFLAKE database, or a SNOWFLAKE database role. The COLUMNS view is listed under OBJECT_VIEWER. The same pages list latency for this view as 90 minutes, and they say latency figures are approximate, so this view can lag the current catalog. Use INFORMATION_SCHEMA when you want the database selected in the worksheet. The account usage overview says information schema views have no latency.

Replace MY_DATABASE with the database name as Snowflake stores it. An unquoted name is stored in uppercase. A name created with double quotes keeps the spelling you quoted. The upload groups rows by table_schema and table_name, not by database. Leaving this filter off would merge two databases that use the same schema and table name.

One database from account usage

SELECT
  table_catalog,
  table_schema,
  table_name,
  column_name,
  data_type,
  is_nullable,
  comment
FROM snowflake.account_usage.columns
WHERE deleted IS NULL
  AND table_catalog = 'MY_DATABASE'
  AND table_schema <> 'INFORMATION_SCHEMA'
ORDER BY table_schema, table_name, ordinal_position;

Save the result as a CSV with the header row. The literal MY_DATABASE is a placeholder, not a database on your account.

These queries were checked against the current Snowflake pages for INFORMATION_SCHEMA.COLUMNS, ACCOUNT_USAGE.COLUMNS, and the account usage overview. They were not run on a Snowflake account. INFORMATION_SCHEMA.TABLE_CONSTRAINTS does not name the column in a key. For CREATE TABLE text, use the schema export guide.

Sensitivity flags and the glossary

DictionaryLeap flags potential sensitivity from the column name. A name such as email, phone, or a government identifier can be tagged. The tag is potential. It is not legal advice, and it does not mean the column was inspected for personal data. These queries do not select row values, so the file has no sample of what the column stores.

Healthcare, Financial services, and Retail are optional industry presets on the upload form. A preset adds terms and sensitivity rules when column names match. Any other choice uses the General preset. The preset does not change the price.

The draft includes a business glossary and taxonomy: domains, subject areas, and terms. Definitions are drafts for a data owner to confirm. The free preview shows the first glossary domain. The Dataset Pack includes a flat glossary plus one domain of the hierarchy, a glossary CSV, and SKOS for that domain. The Database Pack includes the full glossary and taxonomy hierarchy, all parent and child checks, an Excel glossary sheet, a glossary CSV, and SKOS.

A comment or column_comment value is stored on the column. The draft can quote it as a source comment when the text is at least 8 characters. Longer text is shortened to 140 characters. An empty comment is fine. Names and types are enough.

Questions about a file or a charge: contact@logicalleap.io.

FAQ

Start the free preview

The free preview shows the first 25 columns and the first glossary domain. The Dataset Pack is $49 for one table of up to 200 columns, with a flat glossary plus one domain of the hierarchy, and a glossary CSV and SKOS for that domain. The Database Pack is $249 for up to 50 tables and 2,000 columns, with the full glossary and taxonomy hierarchy, all parent and child checks, an Excel glossary sheet, a glossary CSV, and SKOS. Each pack is a one-time price for that upload. It is not a subscription, and nothing renews.

Start the free preview