Integrations
Breadcrumbs

Snowflake

Integration model

Metadata extraction

 For the extraction of metadata from an object, the methods offered by the Snowflake JDBC driver are used, through which access to the definition of schemas and tables is obtained.

It extracts the following attributes which must have the same names in the attribute_definition table, field name, so that they appear in the template.

  • catalog with the catalog value in the database.

  • schema with the schema value in the database.

  • physicalName and name with the same value, the table name

  • path with the concatenation of catalog, schema and table values.

  • infrastructure with the selected value.

  • technology with the selected value.

  • zone with the selected value.

  • tags for tags explicitly created on the asset

  • inheritedTags for tags inherited from ancestor assets (Account > Database > Schema)

It will also send the following attributes related to the dataset_fields of the requested resource:

  • name with the value of the corresponding field.

  • physicalName with the value of the corresponding field

  • defaultValue with the default value defined for the corresponding field.

  • fieldDataType with the data type defined for the corresponding field.

  • length with the size of the corresponding field.

  • incrementalField indicating whether it is an incremental field.

  • position position of the corresponding field.

  • precision with the precision value of the corresponding field.

  • nullable indicating whether the corresponding field is nullable.

  • pk indicating whether the field is a pk.

  • description with the corresponding value for the field.

  • tags for tags explicitly created on the asset

  • inheritedTags for tags inherited from ancestor assets (Account > Database > Schema > Table/View)

 

In both cases, extra attributes are retrieved (depending on the driver and the specific metadata of the table) that the driver provides about both the table and the columns.

The attributes to be created in Anjana must have the following types:

 

Attribute name

Attribute type

Catalog

INPUT_TEXT

Schema

INPUT_TEXT

PhysicalName

INPUT_TEXT

Path

INPUT_TEXT

Infrastructure

SELECT

Technology

SELECT

Zone

SELECT

Name

INPUT_TEXT

DefaulValue

INPUT_TEXT

FieldDataType

INPUT_TEXT

Length

INPUT_NUMBER

IncrementalField

INPUT_CHECKBOX

Position

INPUT_NUMBER

Precision

INPUT_NUMBER

Nullable

INPUT_CHECKBOX

Pk

INPUT_CHECKBOX

Description

ENRICHED_TEXT_AREA_INTERNATIONAL

Tags

ARRAY_ALPHANUMERICAL

InheritedTags

ARRAY_ALPHANUMERICAL

 

The plugin is capable of extracting metadata from the following types of elements:

  • Database tables

  • Views

Data sampling

Using the Snowflake JDBC driver, a simple SELECT query is executed to access a limited number of elements from the table to retrieve a sample of the stored data. Additionally, the values of sensitive fields are replaced by asterisks.

Configuration

Connection format

The connection URL format is jdbc:snowflake://<orgname>-<account>.snowflakecomputing.com/?db=<database>&warehouse=<warehouse>&JDBC_QUERY_RESULT_FORMAT=JSON

Permissions

User or role with USAGE permissions on the database and schema where the tables/views to be governed are located.

User or role with REFERENCE permissions on the tables or views for which metadata extraction is desired.

User or role with SELECT permissions on the tables or views for which data sampling is desired.

Metadata extraction

Below is the Snowflake documentation showing the various fields extracted from tables *:

https://docs.snowflake.com/en/developer-guide/jdbc/jdbc-api#object-databasemetadata

Important → For some column types the length observed in the table may differ from that extracted by Anjana; refer to the previously indicated documentation.

Tables with special characters in their name

Important → Using special characters such as "/" in table or view names is NOT recommended because sampling will not work.