{"id":20936900,"url":"https://github.com/datafold/datafold-api-examples","last_synced_at":"2025-05-13T21:31:13.919Z","repository":{"id":104555133,"uuid":"488377760","full_name":"datafold/datafold-api-examples","owner":"datafold","description":"Demonstrates examples of the GraphQL API","archived":false,"fork":false,"pushed_at":"2024-08-01T13:22:14.000Z","size":42,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T08:22:53.075Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datafold.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-03T22:13:43.000Z","updated_at":"2024-08-06T22:42:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"f79412b2-0d7a-480a-931e-ccf1a5668916","html_url":"https://github.com/datafold/datafold-api-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datafold%2Fdatafold-api-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datafold%2Fdatafold-api-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datafold%2Fdatafold-api-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datafold%2Fdatafold-api-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datafold","download_url":"https://codeload.github.com/datafold/datafold-api-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254030962,"owners_count":22002680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T22:29:30.641Z","updated_at":"2025-05-13T21:31:13.569Z","avatar_url":"https://github.com/datafold.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Useful examples for Datafold GraphQL API\n----------------------------------------\n\n## Preparation steps\n\nMake sure you have Python ⩾ 3.10 installed.\n\n    # Create and activate python virtual environment\n    virtualenv .venv\n    . .venv/bin/activate\n    \n    # Install dependencies\n    pip install -r requirements.txt\n\n    # If you are using a single-tenant install, set its base URL\n    export DATAFOLD_HOST=https://app.datafold.com\n\n    # Set env variable with Datafold key\n    # You can get it here: https://app.datafold.com/users/me\n    export DATAFOLD_API_KEY=\u003ctoken-that-you-can-get-in-datafold-ui\u003e\n\n## Try this out\n\nIssue the following command to print available commands:\n\n```shell\nj\n```\n\n…and follow the white rabbit.\n\n\u003e For instance, `j analyze-impact` will help you analyze downstream impact of a table or its columns.\n\n# Commands not wrapped under `j`\n\nMight be slightly out of date.\n\n## Usage counters\n\nShows how to use column-level access counters. It prints out all columns of a table and number of times they were accessed by different users.\n\n`./usage_counters.py 1234 DATABASE SCHEMA TABLE`\n\n1234 here is the datasource_id, this is found in the URL on the catalog. Ex: /catalog/profile/table/1234/\n\n## Propogate tag\nPropagates a tag through connected columns. One of the main usecases is to propagate PII tags to all downstream tables.\n\nTo add tags:\n`./propagate_tag.py 1234 DATABASE SCHEMA TABLE tagName --set-tag`\n\nTo remove tags:\n`./propagate_tag.py 1234 DATABASE SCHEMA TABLE tagName --no-set-tag`\n\n## Get lineage\nGets and prints lineage for a table. Default depth is 1 upstream, 1 downstream and can be changed\nwith `-u` and `-d` optional arguments.\n\n`./get_lineage.py 1234 DATABASE.SCHEMA.TABLENAME`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatafold%2Fdatafold-api-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatafold%2Fdatafold-api-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatafold%2Fdatafold-api-examples/lists"}