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.2.tar.gz (5.7 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.2-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbt_select_builder-0.1.2.tar.gz
  • Upload date:
  • Size: 5.7 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.2.tar.gz
Algorithm Hash digest
SHA256 3050aa2c25c417d73df32c3696cc58c659a1175b2bbddea0e0b55a287873ce17
MD5 9bb1b80e87dfa136d281aae332021131
BLAKE2b-256 3604d640d240663e30102697a00ce7470bb8ee4333a95d6b6c06b8aed33dc871

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_select_builder-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dbt_select_builder-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 25b64e4ec9c31854f4b9d13999c394be7f776b5dc94ef842630ea9d9eeea34d2
MD5 29828f362a302aae14b93f8ba28ec7d9
BLAKE2b-256 2cc8767e2680b150e58d59fa38412ab80609214320b85edecf1ba8346e48aaec

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_select_builder-0.1.2-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

This release

0.1.2 This release

2 files

0.1.1

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