Simple Declarative Data Pipelines
Combine the simplicity of Preql/Trilogy with the modern data stack.
Compile your models to ETL scripts to run on demand. Rebuild, run, and test easily.
Translates 'Persist' statements in Preql/Trilogy to scheduled ETL jobs.
Currently supported backends:
- DBT
[!WARNING] This is a work in progress. Please report any issues or feature requests.
Flags
--optimize=X - Any CTE used at least X times in calculating final model outputs will be materialized for reuse.
[!TIP] Don't worry about optimizing your temp table graph ever again - write your final tables and let PreqLT handle the rest.
Install
pip install pypreqlt
How to Run
preqlt <preql_path> <dbt_project_root_path> --run
preqlt dbt/models/core/ ./dbt bigquery --run
Each source preql file will be built into a separate DBT sub folder with one model per persist statement.
17:12:37 Running with dbt=1.7.4
17:12:38 Registered adapter: bigquery=1.7.2
17:12:38 Found 4 models, 4 tests, 0 sources, 0 exposures, 0 metrics, 447 macros, 0 groups, 0 semantic models
17:12:38
17:12:40 Concurrency: 4 threads (target='dev')
17:12:40
17:12:41 1 of 4 START sql view model dbt_test.customers ................................. [RUN]
17:12:41 2 of 4 START sql table model dbt_test.customers_preql_preqlt_gen_model ......... [RUN]
17:12:41 3 of 4 START sql table model dbt_test.my_first_dbt_model ....................... [RUN]
17:12:42 1 of 4 OK created sql view model dbt_test.customers ............................ [CREATE VIEW (0 processed) in 1.09s]
17:12:43 3 of 4 OK created sql table model dbt_test.my_first_dbt_model .................. [CREATE TABLE (2.0 rows, 0 processed) in 2.78s]
17:12:43 4 of 4 START sql view model dbt_test.my_second_dbt_model ....................... [RUN]
17:12:44 2 of 4 OK created sql table model dbt_test.customers_preql_preqlt_gen_model .... [CREATE TABLE (100.0 rows, 4.3 KiB processed) in 3.55s]
17:12:44 4 of 4 OK created sql view model dbt_test.my_second_dbt_model .................. [CREATE VIEW (0 processed) in 1.10s]
17:12:44
17:12:44 Finished running 2 view models, 2 table models in 0 hours 0 minutes and 6.37 seconds (6.37s).
17:12:45
17:12:45 Completed successfully
17:12:45
17:12:45 Done. PASS=4 WARN=0 ERROR=0 SKIP=0 TOTAL=4
customers: success
my_first_dbt_model: success
customers_preql_preqlt_gen_model: success
my_second_dbt_model: success
From IO
Write-Output """constant x <-5; persist into static as static select x;""" | preqlt C:\Users\ethan\coding_projects\pypreql-etl\jaffle_shop bigquery
Metadata
Release files for pypreqlt 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pypreqlt-0.0.3.tar.gz | 12.4 kB | Without provenance | Details for pypreqlt-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pypreqlt-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for pypreqlt-0.0.3-py3-none-any.whl |
Total release size: 25.1 kB
Release files / pypreqlt-0.0.3.tar.gz
| Download URL | pypreqlt-0.0.3.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
522079ebd1d7f597cbc91d8e31984a8e5449cd7ba0fe429ca394918114f89430
|
|
BLAKE2b-256 checksum How to use checksums |
68a30f5cc8af7149d8b43188cfd0cff1bddbf69887ec073f86ac6af8f52deb1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / pypreqlt-0.0.3-py3-none-any.whl
| Download URL | pypreqlt-0.0.3-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63c75c0c12a63c9a7d491772de3cc160c1aea563141d89dd797f9e1e1288d56d
|
|
BLAKE2b-256 checksum How to use checksums |
d73b948861ecfd1b0fe4e576cc7c438e4087539c9c4bbc8cd97bc60cb3b7c460
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for pypreqlt 0.0.3
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.