diff --git a/README.md b/README.md index 19e86f676..3be912b5f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/integration_tests/profiles/generate_profiles.py b/integration_tests/profiles/generate_profiles.py index c24901865..1ea3115c5 100644 --- a/integration_tests/profiles/generate_profiles.py +++ b/integration_tests/profiles/generate_profiles.py @@ -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 diff --git a/integration_tests/profiles/profiles.yml.j2 b/integration_tests/profiles/profiles.yml.j2 index a081ebf8b..2d29989a5 100644 --- a/integration_tests/profiles/profiles.yml.j2 +++ b/integration_tests/profiles/profiles.yml.j2 @@ -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 }}