Open Fokko opened 1 year ago
Thanks for kicking this off @Fokko 🏆
I started a tasklist
to track each of the refactor(s) + feature implementation(s) needed for three-part identifiers:
As you create more issues for this, just let me know and we'll add them to that tasklist.
@dbeatty10 Thanks! Much appreciated
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 comment on the issue or else it will be closed in 7 days.
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.
@Fokko I just noticed that this and https://github.com/dbt-labs/dbt-spark/issues/755 were closed as stale, so I'm re-opening them now.
Is this your first time submitting a feature request?
Describe the feature
In preparation for having three-part identifiers
catalog.schema.table
(https://github.com/dbt-labs/dbt-spark/issues/755), I would like to change theinformation
attribute on theSparkRelation
into adict
:https://github.com/dbt-labs/dbt-spark/blob/cb41ab049481bc458871d5c37fad47e59d6b759c/dbt/adapters/spark/relation.py#L36-L37
Describe alternatives you've considered
The current way is unmaintainable with the regex that extracts useful information from the big blob of text. Also, I noticed that the types are missing currently:
Who will this benefit?
Mostly the developers because it is hard to maintain right now, and hard to extend the current situation
Are you interested in contributing this feature?
Yes!
Anything else?
I wanted to add the database to the configuration. In Spark, this is called a catalog: https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.Catalog.html
Since Spark 3.0 it can discover tables/views from multiple catalogs, such as a Hive or Glue catalog. I would love to add this, but this refactor needs to be done first and I also want to keep the PRs concise.