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

[CT-454] Add env var for ra3_node profile config #94

Closed
Tracked by #742
jtcohen6 opened this issue Apr 4, 2022 · 1 comment
Closed
Tracked by #742

[CT-454] Add env var for ra3_node profile config #94

jtcohen6 opened this issue Apr 4, 2022 · 1 comment
Labels
enhancement New feature or request Stale

Comments

@jtcohen6
Copy link
Contributor

jtcohen6 commented Apr 4, 2022

Background

dbt-labs/dbt-core#3408 added support for cross-database (read-only) querying IFF the user is connecting to a cluster with RA3-type nodes. On the recommendation of the Redshift team, who do not anticipate "classic" node types disappearing anytime soon, and see them remaining the default for some time, we kept our preexisting error in place, and gave users a way to tell us (in profiles.yml) whether they're using RA3 or not. (Original discussion in dbt-labs/dbt-core#3179 + dbt-labs/dbt-core#3236)

Problem

dbt Cloud users do not have access to custom profiles.yml fields today, but they do have access to other configuration options (i.e. dbt_project.yml + env vars). Which of those is the right way forward?

  1. "project" config (dbt_project.yml): I can't think of an exact precedent for this. Maybe quoting? Or the simple fact that sources have been defined in another warehouse? When negotiating the fuzzy boundary between configuration of the project and configuration of the warehouse, this feels more warehouse than project.
  2. "global" config (flag + env var + profiles.yml): This feels more consistent with existing configurations.
    • profiles.yml already supports this config (though under a Redshift target, rather than the top-level config: block)
    • Env var is totally doable: DBT_REDSHIFT_RA3_NODE=True|False. If set via env var, this should take precedence over the profiles.yml setting, just like with global configs.
    • Flag would require a change to dbt-core (main.py). Eventually, we should aim to make this not the case, and allow plugins to register their own custom flags.

Tactical question: Which is the right spot to use the env var, if defined?

ra3_node: Optional[bool] = False

ra3_node = self.config.credentials.ra3_node

Much bigger question: Should we natively support env vars for all adapter-specific profiles.yml configs, via the formulation DBT_{ADAPTER}_{CONFIG}? If we could add this logic to dbt-core, in the Credentials base class, it would make it easier to support new configs as soon as they're added. I'm just not sure if this is the right-sized solution for the problem we have today in dbt Cloud, where it's difficult to coordinate versioned schemas of adapter-specific profiles.yml configuration. (I'll open a dbt-core issue for this)

@jtcohen6 jtcohen6 added the enhancement New feature or request label Apr 4, 2022
@github-actions github-actions bot changed the title Add env var for ra3_node profile config [CT-454] Add env var for ra3_node profile config Apr 4, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2022

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 2, 2022
@github-actions github-actions bot closed this as completed Oct 9, 2022
Tonayya added a commit to dbt-labs/docs.getdbt.com that referenced this issue Aug 8, 2023
cross-database referencing is now available with Redshift since the introduction of setting `ra3_node` to true as default which supports this functionality. GH issue [here](dbt-labs/dbt-redshift#94).
mirnawong1 added a commit to dbt-labs/docs.getdbt.com that referenced this issue Aug 9, 2023
cross-database referencing is now available with Redshift since the
introduction of setting `ra3_node` to true as default which supports
this functionality. GH issue
[here](dbt-labs/dbt-redshift#94).

## What are you changing in this pull request and why?
<!---
Describe your changes and why you're making them. If linked to an open
issue or a pull request on dbt Core, then link to them here! 

To learn more about the writing conventions used in the dbt Labs docs,
see the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md).
-->

## Checklist
<!--
Uncomment if you're publishing docs for a prerelease version of dbt
(delete if not applicable):
- [ ] Add versioning components, as described in [Versioning
Docs](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-entire-pages)
- [ ] Add a note to the prerelease version [Migration
Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/guides/migration/versions)
-->
- [ ] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
and [About
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
so my content adheres to these guidelines.
- [ ] Add a checklist item for anything that needs to happen before this
PR is merged, such as "needs technical review" or "change base branch."

Adding new pages (delete if not applicable):
- [ ] Add page to `website/sidebars.js`
- [ ] Provide a unique filename for the new page

Removing or renaming existing pages (delete if not applicable):
- [ ] Remove page from `website/sidebars.js`
- [ ] Add an entry `website/static/_redirects`
- [ ] [Ran link
testing](https://github.com/dbt-labs/docs.getdbt.com#running-the-cypress-tests-locally)
to update the links that point to the deleted page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

1 participant