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

Raise an exception when schema contains '.'. #222

Merged
merged 2 commits into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## dbt-databricks 1.4.0 (Release TBD)

### Breaking changes
- Raise an exception when schema contains '.'. ([#222](https://github.com/databricks/dbt-databricks/pull/222))
- Containing a catalog in `schema` is not allowed anymore.
- Need to explicitly use `catalog` instead.

## dbt-databricks 1.3.1 (Release TBD)

### Under the hood
Expand Down
6 changes: 2 additions & 4 deletions dbt/adapters/databricks/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ def __pre_deserialize__(cls, data: Dict[Any, Any]) -> Dict[Any, Any]:

def __post_init__(self) -> None:
if "." in self.schema:
logger.warning(
f"The specified schema '{self.schema}' contains '.', "
"which could cause unexpected behavior.\n"
"It will not be allowed in the future release.\n"
raise dbt.exceptions.ValidationException(
f"The schema should not contain '.': {self.schema}\n"
"If you are trying to set a catalog, please use `catalog` instead.\n"
)

Expand Down