Skip to main content

dbt-select-builder

PyPI version Python versions Python Tests License: MIT

What is this repository?

A builder to help you create a select / exclude clause for dbt.

Why does this library exist?

The format of select / exclude clauses in dbt supports only ',' and ' ' (white-space) denoting 'and' and 'or', respectively. Besides parentheses are not supported. Therefore, to create a complicated select clause you often decompose factors into one-line. An example is shown below.

A \land (B \lor C) \Rightarrow A,B \ A,C

The left side is a logical expression and the right side is a dbt-select expression. Since parentheses are not supported, it is required to expand your logical expression by yourself.

How is this library installed?

This library has been uploaded to PyPI.

You can get that using the pip command.

pip install dbt-select-builder

How is this library used?

Using this library, the following can be written in python code in a straightforward way.

from dbt_select_builder import (
    dbt_and,
    dbt_or
)

dbt_and(
    "A",
    dbt_or(
        "C", "D"
    )
).resolve().build()
# "A,C A,D" is returned!

Also, strings with ',' and ' ' are supported.

from dbt_select_builder import (
    dbt_and,
    dbt_or
)

dbt_and(
    "A,B",
    "C D"
).resolve().build()
# "A,B,C A,B,D" is returned!

Download files

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

Source Distribution

dbt_select_builder-0.1.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_select_builder-0.1.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file dbt_select_builder-0.1.1.tar.gz.

File metadata

  • Download URL: dbt_select_builder-0.1.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dbt_select_builder-0.1.1.tar.gz
Algorithm Hash digest
SHA256 653fa2318cc86f212e62b53048eb8fd9a82a071055645acf394dc18639ceef48
MD5 9c0d90809df3fc5d73589f24db65b53f
BLAKE2b-256 0f288c3bc8ac8fc858aff8395e65f58e3880392cde09bb67d32576cdd0dba2f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_select_builder-0.1.1.tar.gz:

Publisher: publish.yml on HirofumiTsuda/dbt-select-builder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbt_select_builder-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dbt_select_builder-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 195b932b997e0b1a1c09fec6f27dccb2e89a27e5cf15e157f7d63750a9682fdb
MD5 f9ea85565d7235edda815162f42f39a4
BLAKE2b-256 e0c36167c29e9c5dd477e974942f9dff64c415a34a0564ea99f82802879ad515

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_select_builder-0.1.1-py3-none-any.whl:

Publisher: publish.yml on HirofumiTsuda/dbt-select-builder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

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