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

dbt catalog doesn't support missing "database" fields #2487

Closed
beckjake opened this issue May 26, 2020 · 1 comment
Closed

dbt catalog doesn't support missing "database" fields #2487

beckjake opened this issue May 26, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@beckjake
Copy link
Contributor

beckjake commented May 26, 2020

Describe the feature

The dbt catalog functionality doesn't support missing database fields.

In a number of places, dbt expects database to be a str, but we should allow it to be None for some databases that don't have support for databases.

  • Catalogs should be allowed to set the database to None for data warehouses that don't have them.
  • list_relations should be allowed to take None for its database
    • on most data warehouses, None should either be an error or mean target.database.
    • on Spark, anything but None or the schema would be an error.
  • get_relation should get the same treatment
  • That's probably it?

Should this be extended to schemas?

Describe alternatives you've considered

We can set database='' everywhere. Kind of ugly! I would like to be able to differentiate "this component does not exist/has no meaning" vs "this is the empty string"...
Edit: This actually doesn't work without writing a bunch of new agate type tester things because by default, '' is coerced into None (which makes sense for seeds!).

Additional context

This is mostly relevant for Spark.

Who will this benefit?

Spark users, developers.

@beckjake beckjake added enhancement New feature or request triage labels May 26, 2020
@drewbanin drewbanin removed the triage label May 26, 2020
@beckjake beckjake mentioned this issue May 26, 2020
4 tasks
@beckjake
Copy link
Contributor Author

Fixed in #2489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants