Skip to main content

dbt integration for Cube

Project description

cube_dbt

cube_dbt is the dbt integration for Cube that helps define the data model of the semantic layer on top of dbt models.

Installation

pip install cube_dbt

Usage

manifest_url = 'https://bucket.s3.amazonaws.com/manifest.json'
dbt = (
  Dbt
  .from_url(manifest_url)
  .filter(
    paths=['marts/'],
    tags=['cube'],
    names=['my_table', 'my_table_2']
  )
)
print(dbt.models)

# For use in Jinja templates:
print(dbt.model('name').as_cube())
print(dbt.model('name').as_dimensions(skip=['id']))
print(dbt.model('name').column('name').as_dimension())

Development

Run tests:

pdm run test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cube_dbt-0.6.0.tar.gz (46.4 kB view details)

Uploaded Source

Built Distribution

cube_dbt-0.6.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file cube_dbt-0.6.0.tar.gz.

File metadata

  • Download URL: cube_dbt-0.6.0.tar.gz
  • Upload date:
  • Size: 46.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.9.2 CPython/3.11.5

File hashes

Hashes for cube_dbt-0.6.0.tar.gz
Algorithm Hash digest
SHA256 292856a64c17dd6038c5c74169d7b13b8264db1799b032759d556cf178993c46
MD5 986ab67d5d5bdc10be2f0ee80de1a167
BLAKE2b-256 f4f6fff173c57b738c656dfc31551538af35d98a4eea35eb1c1192808b3b33b6

See more details on using hashes here.

File details

Details for the file cube_dbt-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: cube_dbt-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.9.2 CPython/3.11.5

File hashes

Hashes for cube_dbt-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d42016a9736013130db66a95a4a942fc2bbb3a7727b283e53ca4c64a6a82b909
MD5 e320ac860c4f44767d770c036584860e
BLAKE2b-256 ddb15b158fd4de8971ad25028e8f6e6d54e9441562ffc6b015340f9e65e653ef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page