Enhanced PreQL for common ETL needs.
Project description
Simple Data Pipelines
Combine the simplicity and guarantees of Preql with the power of open source ETL.
Compile your models to ETL scripts to run on demand through the modern data stack. Rebuild on demand.
Currently supported backends:
- DBT
Flags
--optimize=X - Any CTE used at least X times in calculating final model outputs will be materialized for reuse.
Install
pip install pypreqlt
How to run
Copy example_file contents into models\example for the "jaffle_project" DBT starter
python preqlt/scripts/main.py C:\Users\ethan\coding_projects\pypreql-etl\jaffle_shop\models\example\customer.preql C:\Users\ethan\coding_projects\pypreql-etl\jaffle_shop bigquery
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;""" | python preqlt/scripts/main.py C:\Users\ethan\coding_projects\pypreql-etl\jaffle_shop bigquery
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
pypreqlt-0.0.1.tar.gz
(11.5 kB
view details)
Built Distribution
pypreqlt-0.0.1-py3-none-any.whl
(12.0 kB
view details)
File details
Details for the file pypreqlt-0.0.1.tar.gz
.
File metadata
- Download URL: pypreqlt-0.0.1.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfd6817e377a781487c55e6398c91993f3236c50b0848c46fdf46c02a6cb473a |
|
MD5 | 2393b6b9e71c5b2bc7184df0d162f239 |
|
BLAKE2b-256 | ab86a4d6208c8676e9005363ffb49de75b612f307aa83e78dcc80e7914cf3079 |
File details
Details for the file pypreqlt-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pypreqlt-0.0.1-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ed56e11b48a9eec121cea195b2df89fb51039215cc85cdf27f3a5baff91e20f |
|
MD5 | 696159ec355f676e15de86b47e0f22d5 |
|
BLAKE2b-256 | 9ca387123a4ba36a8571c9c7de029c38a0560d6dd69dd0df6e7b01a14af14df8 |