dbt-databricks-factory
Creates dbt based GCP workflows.
Installation
Use the package manager pip to install dbt-databricks-factory for [dp (data-pipelines-cli)]:
pip install dbt-databricks-factory
Usage
To create a new dbt workflow json schema, run:
python -m dbt_databricks_factory.cli create-job \
--job-name '<job name>' \
--project-dir '<dbt project directory>' \
--profiles-dir '<path to profiles directory>' \
--git-provider '<git provider>' \
--git-url 'https://url.to/repo.git' \
--git-branch 'main' \
--job-cluster my-cluster-name @path/to/cluster_config.json \
--default-task-cluster my-cluster-name \
--library 'dbt-databricks>=1.0.0,<2.0.0' \
--library 'dbt-bigquery==1.3.0' \
--pretty \
path/to/dbt/manifest.json > workflow.json
This workflow will create a json file with the dbt workflow definition. You can then use it to create a new workflow in Databricks by for example post request like here:
curl --fail-with-body -X POST "${DATABRICKS_HOST}api/2.1/jobs/create" \
-H "Authorization: Bearer ${DATABRICKS_TOKEN}" \
-H "Content-Type: application/json" \
-d "@workflow.json" >job_id.json
echo "Job ID:"
cat job_id.json
curl --fail-with-body -X POST "${DATABRICKS_HOST}api/2.1/jobs/run-now" \
-H "Authorization: Bearer ${DATABRICKS_TOKEN}" \
-H "Content-Type: application/json" \
-d @job_id.json >run_id.json
echo "Run ID:"
cat run_id.json
curl --fail-with-body -X GET -G "${DATABRICKS_HOST}api/2.1/jobs/runs/get" \
-H "Authorization: Bearer ${DATABRICKS_TOKEN}" \
-d "run_id=$(jq -r '.run_id' < run_id.json)" >run_status.json
jq < run_status.json
To get more information about the command, run:
python -m dbt_databricks_factory.cli create-job --help
Metadata
Release files for dbt-databricks-factory 0.1.1
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 |
|---|---|---|---|---|
| dbt-databricks-factory-0.1.1.tar.gz | 16.3 kB | Without provenance | Details for dbt-databricks-factory-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dbt_databricks_factory-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for dbt_databricks_factory-0.1.1-py3-none-any.whl |
Total release size: 31.5 kB
Release files / dbt-databricks-factory-0.1.1.tar.gz
| Download URL | dbt-databricks-factory-0.1.1.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3fa854b246f2f093cca13de7bc9eaa6a3f841cafdddf4c97c871ccd8cf37b26
|
|
BLAKE2b-256 checksum How to use checksums |
0a6741c6185baedd9180f02ceeb792c1f72ca75f962aaf1fbc0cef2718308bf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.5
|
Release files / dbt_databricks_factory-0.1.1-py3-none-any.whl
| Download URL | dbt_databricks_factory-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2eee92673e854c11f94e51b5593964a3462af3cd2037b576feeee9b1186c2cb1
|
|
BLAKE2b-256 checksum How to use checksums |
db484c1d01bd0f2b1dbf8c135b445429524b420d6fded82d124598821026fdfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.5
|
Security for dbt-databricks-factory 0.1.1
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.