Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The package has two core components:

**1. Elementary Tables**
Using dbt's on-run-end hook, the package automatically parses your dbt artifacts and run results and loads them as structured tables into your warehouse. This includes:

- **Metadata tables** — models, tests, sources, exposures, columns, seeds, snapshots, and more
- **Run results tables** — invocations, model run results, test results, source freshness, and job-level outcomes

Expand Down
7 changes: 6 additions & 1 deletion integration_tests/profiles/generate_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,18 @@ def _yaml_inline(value: Any) -> str:
"""Render *value* for inline YAML.

* Dicts (e.g. bigquery keyfile) → compact ``{key: val, …}``
* Multi-line strings (e.g. PEM private keys) → double-quoted scalar with
escaped newlines so the rendered profiles.yml stays parseable inline.
* Undefined (docker-only, no secrets) → empty string ``''``
* Everything else → pass through as-is
* Everything else (incl. single-line strings) → pass through as-is so
adapter-side type coercion still works (e.g. ``port: 5439`` stays an int).
"""
if isinstance(value, Undefined):
return "''"
if isinstance(value, dict):
return yaml.dump(value, default_flow_style=True).strip()
if isinstance(value, str) and "\n" in value:
return yaml.dump(value, default_flow_style=True, default_style='"').strip()
return value


Expand Down
5 changes: 4 additions & 1 deletion integration_tests/profiles/profiles.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@
type: snowflake
account: {{ snowflake_account | toyaml }}
user: {{ snowflake_user | toyaml }}
password: {{ snowflake_password | toyaml }}
private_key: {{ snowflake_private_key | toyaml }}
{%- if snowflake_private_key_passphrase is defined and snowflake_private_key_passphrase %}
private_key_passphrase: {{ snowflake_private_key_passphrase | toyaml }}
{%- endif %}
role: {{ snowflake_role | toyaml }}
database: {{ snowflake_database | toyaml }}
warehouse: {{ snowflake_warehouse | toyaml }}
Expand Down
Loading