-
Notifications
You must be signed in to change notification settings - Fork 76
refactor: move some hacks location #742
refactor: move some hacks location #742
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we merge this before #739 ?
def get_relation(self, database: str, schema: str, identifier: str): | ||
# HACK: When compiling Python models, we get an all-False quoting policy | ||
# This does not happen in 1.4 | ||
if self._db_adapter.type() == "athena": | ||
# and dbt-athena-community breaks for that case | ||
self.config.quoting = {"database": True, "schema": True, "identifier": True} | ||
|
||
return self._db_adapter.get_relation(database, schema, identifier) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Does it matter if we put it in a wrapper or in impl.py
? I think impl.py
is better because it's more visible there. This feels more like putting something under a rug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way I saw this change was taking it from the "general" soluton of the Adapter Mixin and putting it in the wrapper that is actually being used, since this is 1.3-specific and will not be replicated for 1.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging and you can make a decision in your PR
Great suggestion, but this is not going into |
* tests(dbt-fal): add athena profile * feat: add dbt-athena-community support dbt-athena from PyPI doesn't support dbt 1.3, but dbt-athena-community does https://github.com/dbt-athena/dbt-athena dbt-athena-community does not support dbt 1.4, so this branch doesn't need to be merged to main. Instead, we will release a patch to dbt-fal 1.3 in order to add support to dbt-athena-community * PR comments * refactor: move some hacks location (#742) --------- Co-authored-by: Matteo Ferrando <[email protected]>
* tests(dbt-fal): add athena profile * feat: add dbt-athena-community support dbt-athena from PyPI doesn't support dbt 1.3, but dbt-athena-community does https://github.com/dbt-athena/dbt-athena dbt-athena-community does not support dbt 1.4, so this branch doesn't need to be merged to main. Instead, we will release a patch to dbt-fal 1.3 in order to add support to dbt-athena-community * PR comments * refactor: move some hacks location (#742) --------- Co-authored-by: Matteo Ferrando <[email protected]>
* tests(dbt-fal): add athena profile * feat: add dbt-athena-community support dbt-athena from PyPI doesn't support dbt 1.3, but dbt-athena-community does https://github.com/dbt-athena/dbt-athena dbt-athena-community does not support dbt 1.4, so this branch doesn't need to be merged to main. Instead, we will release a patch to dbt-fal 1.3 in order to add support to dbt-athena-community * PR comments * refactor: move some hacks location (#742) --------- Co-authored-by: Matteo Ferrando <[email protected]>
* tests(dbt-fal): add athena profile * feat: add dbt-athena-community support dbt-athena from PyPI doesn't support dbt 1.3, but dbt-athena-community does https://github.com/dbt-athena/dbt-athena dbt-athena-community does not support dbt 1.4, so this branch doesn't need to be merged to main. Instead, we will release a patch to dbt-fal 1.3 in order to add support to dbt-athena-community * PR comments * refactor: move some hacks location (#742) --------- Co-authored-by: Matteo Ferrando <[email protected]>
* tests(dbt-fal): add athena profile * feat: add dbt-athena-community support dbt-athena from PyPI doesn't support dbt 1.3, but dbt-athena-community does https://github.com/dbt-athena/dbt-athena dbt-athena-community does not support dbt 1.4, so this branch doesn't need to be merged to main. Instead, we will release a patch to dbt-fal 1.3 in order to add support to dbt-athena-community * PR comments * refactor: move some hacks location (#742) --------- Co-authored-by: Matteo Ferrando <[email protected]>
* feat(dbt-adapter): dbt-athena-community support (#741) * tests(dbt-fal): add athena profile * feat: add dbt-athena-community support dbt-athena from PyPI doesn't support dbt 1.3, but dbt-athena-community does https://github.com/dbt-athena/dbt-athena dbt-athena-community does not support dbt 1.4, so this branch doesn't need to be merged to main. Instead, we will release a patch to dbt-fal 1.3 in order to add support to dbt-athena-community * PR comments * refactor: move some hacks location (#742) --------- Co-authored-by: Matteo Ferrando <[email protected]> * remove 1.3-specific hack * Add tests * comments * Fix test setup * update athena profile * fix credential parsing in isolated envs --------- Co-authored-by: Matteo Ferrando <[email protected]>
FYI: the quoting was fixed in dbt for 1.4+ in dbt-labs/dbt-core#6620