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

Fixed the if_exists parameter in CreateTableFromBlob task #874

Merged
merged 4 commits into from
Mar 27, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Fixed
- Fixed the `if_exists` parameter definition in the `CreateTableFromBlob` task.
- Changed `requirements.txt` to level up version of `dbt-sqlserver` in order to fix bug with `MAXRECURSION` error in dbt_run

### Changed
Expand Down
6 changes: 3 additions & 3 deletions viadot/tasks/azure_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def run(
table: str,
dtypes: Dict[str, Any],
sep: str = None,
if_exists: Literal = ["fail", "replace", "append", "delete"],
if_exists: Literal["fail", "replace", "append", "delete"] = "fail",
):
"""
Create a table from an Azure Blob object.
Expand All @@ -75,8 +75,8 @@ def run(
schema (str): Destination schema.
table (str): Destination table.
dtypes (Dict[str, Any]): Data types to force.
sep (str): The separator to use to read the CSV file.
if_exists (Literal, optional): What to do if the table already exists.
sep (str, optional): The separator to use to read the CSV file. Defaults to None.
if_exists (Literal["fail", "replace", "append", "delete"], optional): What to do if the table already exists. Defaults to "fail".
"""

fqn = f"{schema}.{table}" if schema else table
Expand Down
Loading