Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New cli command tr-pull-datapoints #365

Merged
merged 6 commits into from
Nov 22, 2024

Conversation

michaelfarrell76
Copy link
Member

@michaelfarrell76 michaelfarrell76 commented Nov 22, 2024

tr-pull-datapoints

This command allows for pulling your Data Inventory -> Datapoints into a CSV.

Authentication

In order to use this cli, you will first need to generate an API key on the Transcend Admin Dashboard (https://app.transcend.io/infrastructure/api-keys).

The API key must have the following scopes:

  • "View Data Inventory"

Arguments

Argument Description Type Default Required
auth The Transcend API key with the scopes necessary for the command. string N/A true
file The file to save datapoints to string - path ./datapoints.csv false
transcendUrl URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. string - URL https://api.transcend.io false
dataSiloIds Comma-separated list of data silo IDs to filter by string N/A false
includeAttributes Whether to include attributes in the output boolean false false
includeGuessedCategories Whether to include guessed categories in the output boolean false false
parentCategories Comma-separated list of parent categories to filter by string N/A false
subCategories Comma-separated list of subcategories to filter by string N/A false

Usage

All arguments

yarn tr-pull-datapoints --auth=$TRANSCEND_API_KEY --file=./datapoints.csv --includeGuessedCategories=true --parentCategories=CONTACT,ID,LOCATION --subCategories=79d998b7-45dd-481c-ae3a-856fd93458b2,9ecc213a-cd46-46d6-afd9-46cea713f5d1 --dataSiloIds=f956ccce-5534-4328-a78d-3a924b1fe429

Pull datapoints for specific data silos:

yarn tr-pull-datapoints --auth=$TRANSCEND_API_KEY --file=./datapoints.csv --dataSiloIds=f956ccce-5534-4328-a78d-3a924b1fe429

Include attributes in the output:

yarn tr-pull-datapoints --auth=$TRANSCEND_API_KEY --file=./datapoints.csv --includeAttributes=true

Include guessed categories in the output:

yarn tr-pull-datapoints --auth=$TRANSCEND_API_KEY --file=./datapoints.csv --includeGuessedCategories=true

Filter by parent categories:

yarn tr-pull-datapoints --auth=$TRANSCEND_API_KEY --file=./datapoints.csv --parentCategories=ID,LOCATION

Filter by subcategories:

yarn tr-pull-datapoints --auth=$TRANSCEND_API_KEY --file=./datapoints.csv --subCategories=79d998b7-45dd-481c-ae3a-856fd93458b2,9ecc213a-cd46-46d6-afd9-46cea713f5d1

Specify the backend URL, needed for US hosted backend infrastructure:

yarn tr-pull-datapoints --auth=$TRANSCEND_API_KEY --file=./datapoints.csv --transcendUrl=https://api.us.transcend.io

@michaelfarrell76 michaelfarrell76 merged commit 4eafcf0 into main Nov 22, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants