Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add elementary profile in profiles.yml #249

Merged
merged 5 commits into from
Nov 21, 2023
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions dags/stellar_etl_airflow/build_dbt_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,29 @@ def create_dbt_profile(project="prod"):
token_uri: "{dbt_token_uri}"
auth_provider_x509_cert_url: "{dbt_auth_provider_x509_cert_url}"
client_x509_cert_url: "{dbt_client_x509_cert_url}"
elementary:
outputs:
default:
dataset: elementary
maximum_bytes_billed: {dbt_maximum_bytes_billed}
job_execution_timeout_seconds: {dbt_job_execution_timeout_seconds}
job_retries: {dbt_job_retries}
location: us
method: service-account-json
project: "{dbt_project}"
threads: {dbt_threads}
type: bigquery
keyfile_json:
type: "service_account"
project_id: "{dbt_project}"
private_key_id: "{dbt_private_key_id}"
private_key: "{dbt_private_key}"
client_email: "{dbt_client_email}"
client_id: "{dbt_client_id}"
auth_uri: "{dbt_auth_uri}"
token_uri: "{dbt_token_uri}"
auth_provider_x509_cert_url: "{dbt_auth_provider_x509_cert_url}"
client_x509_cert_url: "{dbt_client_x509_cert_url}"
"""

create_dbt_profile_cmd = f"echo '{profiles_yml}' > profiles.yml;"
Expand Down Expand Up @@ -95,9 +118,10 @@ def build_dbt_task(
[
create_dbt_profile_cmd,
execution_date,
"dbt ",
"dbt",
"--no-use-colors",
command_type,
" --select",
"--select",
model_name,
dbt_full_refresh,
]
Expand Down