Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scroll ignore
scroll-viewporttrue
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-htmltrue
scroll-epubtrue

Open in new tab

About Collectors

Insert excerpt
Collector Method
Collector Method
nameabout

...

Pre-requisites

  • Python 3.6 - 3.9

  • Access to the KADA Collector repository that contains the Snowflake whl

    • The repository is currently hosted in KADA’s Azure Blob Storage. You will be given a SAS token to access the repository. Reach out to KADA Support (support@kada.ai) if you do not have access.

    • Download the Snowflake whl (e.g. kada_collectors_extractors_snowflake-#.#.#-py3-none-any.whl)

  • Access to K landing directory

  • Access toSnowflake (see section below)

...

Snowflake integration uses username/password. Using keys will be supported in an upcoming release

...

Step 1: Create the Source in K

Create a Snowflake source in K

  • Go to Settings, Select Sources and click Add Source

  • Select “Load from File” option

  • Give the source a Name - e.g. Snowflake Production

  • Add the Host name for the Snowflake Server

  • Click Finish Setup

...

Step 2: Getting Access to the Source Landing Directory

Insert excerpt
Collector Method
Collector Method
namelanding

...

Step 3: Install the Collector

It is recommended to use a python environment such as pyenv or pipenv if you are not intending to install this package at the system level.

...

OS

Packages

CentOS

libffi-devel
openssl-devel

Ubuntu

libssl-dev
libffi-dev

...

Step 4: Configure the Collector

The collector requires a set of parameters to connect to and extract metadata from Snowflake

...

Code Block
languagejson
{
    "account": "",
    "username": "",
    "password": "",
    "information_database": "",
    "role": "",
    "warehouse": "",
    "databases": [],
    "login_timeout": 5,
    "output_path": "/tmp/output",
    "mask": true
}

...

Step 5: Run the Collector

The following code is an example of how to run the extractor. You may need to uplift this code to meet any code standards at your organisation.

...

If you are handling external arguments of the runner yourself, you’ll need to consider additional items for the run method. Refer to this document for more information https://kadaai.atlassian.net/wiki/spaces/KSL/pages/1902411777/Additional+Notes#The-run-method

...

Step 6: Check the Collector Outputs

K Extracts

A set of files (eg metadata, databaselog, linkages, events etc) will be generated. These files will appear in the output_path directory you set in the configuration details

...

A high water mark file is created in the same directory as the execution called snowflake_hwm.txt and produce files according to the configuration JSON. This file is only produced if you call the publish_hwm method.

...

Step 7: Push the Extracts to K

Once the files have been validated, you can push the files to the K landing directory.

You can use Azure Storage Explorer if you want to initially do this manually. You can push the files using python as well (see Airflow example below)

...

Example: Using Airflow to orchestrate the Extract and Push to K

Insert excerpt
Collector Method
Collector Method
nameairflow

...