Add your description here
Project description
dbt-select-builder
A builder to create a select / exclude clause for dbt.
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.
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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbt_select_builder-0.1.0.tar.gz.
File metadata
- Download URL: dbt_select_builder-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1a28463e2c6712eeca21cf2ae7d7392437fb48cd715e6ac37c06c828747ce7c
|
|
| MD5 |
7f1322a8df40f44e642fb1065a37e2c9
|
|
| BLAKE2b-256 |
5f9417e406efa472b79c7c17d57a04f14c16fb620f507948774d1469c00df3de
|
File details
Details for the file dbt_select_builder-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dbt_select_builder-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5e1e48bdaac3108d982be558872fab838dd7354dd1a01493d633a9a6b7d42aa
|
|
| MD5 |
46b9a4f744cce8873ea25adc13df67c0
|
|
| BLAKE2b-256 |
2ae70b480b1ad670001cee5e6ab58e85b546e9a315c367546d89080e077e2050
|