Skip to main content

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

Preprocessing the manifest.json file

In 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. Here's a list of all keys used by the cube_dbt package:

- nodes
  - name
  - path
  - description
  - config
    - materialized
    - tags
  - resource_type
  - database
  - schema
  - alias
  - relation_name
  - columns
    - name
    - description
    - data_type
    - meta
    - tags

Metadata

Release files for cube_dbt 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cube_dbt 0.6.2
File Size Uploaded Provenance Actions
cube_dbt-0.6.2.tar.gz 48.1 kB Without provenance Details for cube_dbt-0.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cube_dbt 0.6.2
File Interpreter ABI Platform Actions
cube_dbt-0.6.2-py3-none-any.whl Python 3 none any Details for cube_dbt-0.6.2-py3-none-any.whl

Total release size: 54.1 kB

Release files / cube_dbt-0.6.2.tar.gz

Download URL cube_dbt-0.6.2.tar.gz
Size 48.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b18dafaa0f1ad1e20a2b9ef437f71b7c0fa1f9909d4cb897bb2830c42d9da1ae
BLAKE2b-256 checksum
How to use checksums
853596a502f1eabf714bb750a0f1af032a80f7a013b8c81053ce40beeaaa37ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.22.2 CPython/3.10.6 Darwin/24.3.0

Release files / cube_dbt-0.6.2-py3-none-any.whl

Download URL cube_dbt-0.6.2-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3eb6bcabe5366d8d3c66fdf47257ae236b0042d143e34017223b6ff1533f7af2
BLAKE2b-256 checksum
How to use checksums
4418393a73fd5461f589fa43cd189a5d5f51a87f7df5bce27ed5b8e0353a1cae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.22.2 CPython/3.10.6 Darwin/24.3.0

Security for cube_dbt 0.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page