Sigma

Requirements

  • You must be an organization Admin to create a Sigma API token and Client ID.

  • Anyone with access to an active Sigma API token and Client ID can authenticate with Sigma’s API at the access level associated with the token.

Catalog Managed

To get things started with Sigma in Catalog, you will need to be a Sigma admin and provide us with:

  • A Sigma API token (secret)

  • Your Client ID

  • The Host URL of your instance

For more information on how to retrieve the API Token and Client ID, see their documentation here

To get the correct Host URL of your instance, see their documentation here

You can input your credentials directly into your Catalog account under the following format

{
    "apiToken": "*****",
    "clientId": "*****",
    "host": "https://<your_provider_url>.sigmacomputing.com"
}

If you need further details on Sigma API: link

For your first sync, it will take up to 48h and we will let you know when it is complete ✅

If you are not comfortable giving us access to your credentials, please continue to Client managed 👇

Client managed

Doing a one shot extract

For your trial, you can simply give us a one shot view of your BI tool's

To get things working quickly, here's a Google Colab to run swiftly our package.

Running the Extraction package

Install the PyPi package

For further details on our Catalog Extractor Pypi package: link

Running the PyPi package

Once the package has been installed, you should be able to run the following command in your terminal:

castor-extract-sigma [arguments]

The script will run and display logs as following:

INFO - Extracting users from Sigma API
INFO - POST(https://cloud.sigma.com/api/4.0/login)
INFO - GET(https://cloud.sigma.com/api/4.0/users/search)
INFO - Fetched page 1 / 7 results
INFO - GET(https://catalog.cloud.sigma.com/api/4.0/users/search)
INFO - Fetched page 2 / 0 results


...

INFO - Wrote output file: /tmp/catalog/1649079699-projects.json
INFO - Wrote output file: /tmp/catalog/1649079699-summary.json

Arguments

  • -H, --host : Sigma host

  • -c, --client-id: Sigma client ID

  • -a, --api-token : Generated API key

  • -o, --output : Directory to write to

Scheduling and Push to Catalog

When moving out of trial, you'll want to refresh your Sigma content in Catalog. Here is how to do it:

The Catalog team will provide you with

  1. Catalog Identifier (an id for us to match your Sigma files with your Catalog instance)

  2. Catalog Token An API Token

You can then use the castor-upload command:

castor-upload [arguments]

Arguments

  • -k, --token: Token provided by Catalog

  • -s, --source_id: account id provided by Catalog

  • -t, --file_type: source type to upload. Currently supported are { DBT | VIZ | WAREHOUSE }

Target files

To specify the target files, provide one of the following:

  • -f, --file_path: to push a single file

or

  • -d, --directory_path: to push several files at once (*)

(*) The tool will upload all files included in the given directory.

Make sure it contains only the extracted files before pushing.

Then you'll have to schedule the script run and the push to Catalog, use your preferred scheduler to create this job

You're done!

Last updated

Was this helpful?