Skip to main content

Running the Sigma collector on-premise

Note

The latest version of the Collector is 2.199. To view the release notes for this version and all previous versions, please go here.

Ways to run the data.world Collector

There are a few different ways to run the data.world Collector--any of which can be combined with an automation strategy to keep your catalog up to date:

  • Create a configuration file (config.yml) - This option stores all the information needed to catalog your data sources. It is an especially valuable option if you have multiple data sources to catalog as you don't need to run multiple scripts or CLI commands separately.

  • Run the collector through a CLI - Repeat runs of the collector requires you to re-enter the command for each run.

Note

This section walks you through the process of running the collector using CLI.

Preparing and running the command

The easiest way to create your Collector command is to:

  1. Copy the following example command in a text editor.

  2. Set the required parameters in the command. The example command includes the minimal parameters required to run the collector

  3. Open a terminal window in any Unix environment that uses a Bash shell and paste the command in it and run in.

docker run --rm --mount type=bind,source=${HOME}/dwcc,target=/dwcc-output --mount
type=bind,source=${HOME}/dwcc,target=/app/log datadotworld/dwcc:2.154
catalog-sigma --agent=initech --output=/dwcc-output --api-token=${DW_AUTH_TOKEN}
--no-log-upload=false --upload=true --name=initech-collection --upload-location=ddw-catalogs
--sigma-api-token=${SIGMA_API_TOKEN} --sigma-clientid=${SIGMA_CLIENT_ID} 
--sigma-cloud-provider=aws 

The following table describes the parameters for the command.

Table 1.

Parameter

Details

Required?

dwcc:<CollectorVersion>

Replace <CollectorVersion> in with the version of the collector you want to use (For example, datadotworld/dwcc:2.113)

Yes

-a =<agent>

--agent=<agent>

--account=<agent>

The ID for the data.world account into which you will load this catalog. The ID is the organization name as it appears in your organization. This is used to generate the namespace for any URIs generated.

Yes

--sigma-cloud-provider=<cloudProvider>

The initials of the cloud platform where Sigma is  hosted. Accepted values: aws, azure or gcp.

Yes

--sigma-api-hostname=<apiHostname>

The endpoint of the cloud platform where Sigma is hosted. For example:

  • For Amazon AWS: https://aws-apisigmacomputing.com

  • For Azure: https://api.us.azure.sigmacomputing.com

  • For Google Cloud: https://api.sigmacomputing.com

Yes

--sigma-api-token=<apiToken>

The Sigma API Token associated with the user account

Yes

--sigma-clientid=<clientId>

The Sigma Client ID associated with the user account

Yes

--workbook-exclude=<excludedWorkbookIds>

Provide workbook IDs. This value is available in the workbook url. For example, if the workbook URL is of the form: https://app.sigmacomputing.   com/<accountname>/workbook/<hyphenated-workbook- name>-<workbookId> , woorkbook ID can be easily  copied as it is from the URL. This includes the  specified Sigma workbook's contents in the catalog. Use the parameter multiple times for multiple workbooks.

For example: --workbook-exclude=" workbook1Id" --workbook-exclude="workbook2Id".

No

--workbook-include=<includedWorkbookIds>

Provide workbook IDs. This value is available in  the workbook URL. For example, if the workbook URL is of the form: https://app.sigmacomputing.com/<accountname>/workbook/<hyphenated-workbook- name>-<workbookId>, woorkbook ID can be easily copied as it is from the url. This includes the  specified Sigma workbook's contents in thecatalog. Use the parameter multiple times for multiple workbooks.

For example: --workbook-include=" workbook1Id" --workbook-include="workbook2Id"

No

--dry-run=<dryRun>

Specify this option to run the collector in dry run mode to test the connection details provided. No metadata is harvested in dry run mode.

No

-n=<catalogName>

--name=<catalogName>

The name of the catalog - this will be used to generate the ID for the catalog as well as the filename into which the catalog file will be written.

Yes

-o=<outputDir>

--output=<outputDir>

The output directory into which any catalog files should be written.

In our example we use the /dwcc -outputas it is running in a Docker container and that is what we specified in the script for a Docker mount point.

You can change this value to anything you would like as long as it matches what you use in the mount point:

-mount type=bind,source=/tmp,target=/dwcc-output ...-o /dwcc-output

In this example, the output will be written to the /tmp directory on the local machine, as indicated by the mount point directive. The log file, in addition to any catalog files, will be written to the directory specified in the mount point directive.

Yes

-L

--no-log-upload

Do not upload the log of the dwcc run to the organization account's catalogs dataset or to another location specified with --upload-location (ignored if --upload not specified)

No

--site=<site>

The slug for the data.world site into which you will load this catalog this is used to generate the namespace for any URIs generated.

No

-H=Host

--api-host=Host

The host for the data.world API.

No

-t=<apiToken>

--api-token=<apiToken>

The data.world API token to use for authentication. The default is to use an environment variable named DW_AUTH_TOKEN.

No

-U

--upload

Whether to upload the generated catalog to the organization account's catalogs dataset or to another location specified with --upload-location (This requires that the --api-token is specified.

No

--upload-location=<uploadLocation>

The dataset to which the catalog is to be uploaded, specified as a simple dataset name to upload to that dataset within the organization's account, or [account/dataset] to upload to a dataset in some other account. This parameter is ignored if --upload is not specified.

No

--disable-lineage-collection

Skip harvesting lineage metadata from Sigma.

No



Common troubleshooting tasks

Collector runtime and troubleshooting

The catalog collector may run in several seconds to many minutes depending on the size and complexity of the system being crawled.

  • If the catalog collector runs without issues, you should see no output on the terminal, but a new file that matching *.dwec.ttl should be in the directory you specified for the output.

  • If there was an issue connecting or running the catalog collector, there will be either a stack trace or a *.log file. Both of those can be sent to support to investigate if the errors are not clear.

A list of common issues and problems encountered when running the collectors is available here.

Automating updates to your metadata catalog

Maintaining an up-to-date metadata catalog is crucial and can be achieved by employing Azure Pipelines, CircleCI, or any automation tool of your preference to execute the catalog collector regularly.

There are two primary strategies for setting up the collector run times:

  • Scheduled: You can configure the collector according to the anticipated frequency of metadata changes in your data source and the business need to access updated metadata. It's necessary to account for the completion time of the collector run (which depends on the size of the source) and the time required to load the collector's output into your catalog. This could be for instance daily or weekly. We recommend scheduling the collector run during off-peak times for optimal performance.

  • Event-triggered: If you have set up automations that refresh the data in a source technology, you can set up the collector to execute whenever the upstream jobs are completed successfully. For example, if you're using Airflow, Github actions, dbt, etc., you can configure the collector to automatically run and keep your catalog updated following modifications to your data sources.