{"id":20127599,"url":"https://github.com/cube-js/cube_dbt","last_synced_at":"2025-05-06T18:31:41.984Z","repository":{"id":196867140,"uuid":"694372995","full_name":"cube-js/cube_dbt","owner":"cube-js","description":"dbt integration for Cube","archived":false,"fork":false,"pushed_at":"2024-03-23T12:22:34.000Z","size":69,"stargazers_count":5,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-17T04:59:35.670Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/cube-js.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}},"created_at":"2023-09-20T21:47:09.000Z","updated_at":"2024-02-15T13:39:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"aff314ad-2c48-4e66-9b36-5840e64a4fd2","html_url":"https://github.com/cube-js/cube_dbt","commit_stats":null,"previous_names":["cube-js/cube_dbt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube-js%2Fcube_dbt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube-js%2Fcube_dbt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube-js%2Fcube_dbt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube-js%2Fcube_dbt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cube-js","download_url":"https://codeload.github.com/cube-js/cube_dbt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224518847,"owners_count":17324673,"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-13T20:22:38.967Z","updated_at":"2025-05-06T18:31:41.967Z","avatar_url":"https://github.com/cube-js.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cube_dbt\n\n`cube_dbt` is the dbt integration for [Cube](https://cube.dev) that helps define the data model of the semantic layer on top of dbt models.\n\n## Installation\n\n```sh\npip install cube_dbt\n```\n\n## Usage\n\n```python\nmanifest_url = 'https://bucket.s3.amazonaws.com/manifest.json'\ndbt = (\n  Dbt\n  .from_url(manifest_url)\n  .filter(\n    paths=['marts/'],\n    tags=['cube'],\n    names=['my_table', 'my_table_2']\n  )\n)\nprint(dbt.models)\n\n# For use in Jinja templates:\nprint(dbt.model('name').as_cube())\nprint(dbt.model('name').as_dimensions(skip=['id']))\nprint(dbt.model('name').column('name').as_dimension())\n```\n\n## Development\n\nRun tests:\n\n```sh\npdm run test\n```\n\n## Preprocessing the `manifest.json` file\n\nIn case of a massive manifest file, it can be preprocessed for optimal performance. The `cube_dbt` package only reads the `nodes` dictionary where `resource_type` is `model`.\nHere's a list of all keys used by the `cube_dbt` package:\n\n``` \n- nodes\n  - name\n  - path\n  - description\n  - config\n    - materialized\n    - tags\n  - resource_type\n  - database\n  - schema\n  - alias\n  - relation_name\n  - columns\n    - name\n    - description\n    - data_type\n    - meta\n    - tags\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcube-js%2Fcube_dbt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcube-js%2Fcube_dbt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcube-js%2Fcube_dbt/lists"}