Skip to content

Commit

Permalink
Stop monkeying around with database
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Beck committed May 27, 2020
1 parent 78f2ae1 commit 6eb854f
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions dbt/adapters/spark/relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,8 @@ class SparkRelation(BaseRelation):
quote_character: str = '`'

def __post_init__(self):
# some core things set database='', which we should ignore.
if self.database and self.database != self.schema:
raise RuntimeException(
f'Error while parsing relation {self.name}: \n'
f' identifier: {self.identifier} \n'
f' schema: {self.schema} \n'
f' database: {self.database} \n'
f'On Spark, database should not be set. Use the schema '
f'config to set a custom schema/database for this relation.'
)
if self.database != self.schema and self.database:
raise RuntimeException('Cannot set database in spark!')

def render(self):
if self.include_policy.database and self.include_policy.schema:
Expand Down

0 comments on commit 6eb854f

Please sign in to comment.