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'
manifest = load_dbt_manifest_from_url(manifest_url)
models = dbt_models(
  manifest,
  path_prefix='marts/',
  tags=['cube'],
  names=['my_table', 'my_table_2']
)
print(models)

# For use in Jinja templates:
model = dbt_model(models, 'name')
print(model_as_cube(model))
print(model_as_dimensions(model))

column = model_column(model, 'name')
print(column_as_dimension(column))

Development

Run tests:

pdm run test

Metadata

Release files for cube_dbt 0.3.1

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.3.1
File Size Uploaded Provenance Actions
cube_dbt-0.3.1.tar.gz 46.1 kB Without provenance Details for cube_dbt-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 50.1 kB

Release files / cube_dbt-0.3.1.tar.gz

Download URL cube_dbt-0.3.1.tar.gz
Size 46.1 kB
Tags Source
SHA-256 checksum
How to use checksums
82647d78e928de477dbbe53d92e87f63dad1723af2de4c6f8b44b0e8e198d8bb
BLAKE2b-256 checksum
How to use checksums
0faa289ea2b2e970f6d668bda0c39af21e38340899f0739ad739283eb183eea0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.9.2 CPython/3.11.5

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

Download URL cube_dbt-0.3.1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e5a4bd055162d05f6a21126b71f8648b9b9e6bffe8ca597348acddb9d0ea2be
BLAKE2b-256 checksum
How to use checksums
dc2ad3b2510da8d08ba12d4c0728a40bd821d0fed49b0b1e151f928ef4ae7ece
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.9.2 CPython/3.11.5

Security for cube_dbt 0.3.1

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