-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Azure SQL, Synapse, and Microsoft Fabric and extend s…
…upport for SQL Server (#2160) * working fabric data source inheriting from sqlserver * fix failing tests * fix table creation in fabric * restore dev-reqs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add email check for sqlserver and fabric * add test for email format * remove useless line * remove useless line * remove extra deps * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * enable auth with mssparkutils * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add fabric spark auth * Update tbump+version --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Milan Lukac <[email protected]> Co-authored-by: Milan Lukac <[email protected]>
- Loading branch information
1 parent
52dc476
commit a08bbcc
Showing
23 changed files
with
480 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ pythonpath = | |
soda/teradata/tests | ||
soda/contracts/tests | ||
soda/oracle/tests | ||
soda/fabric/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ | |
./soda/teradata | ||
./soda/contracts | ||
./soda/atlan | ||
./soda/fabric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,10 @@ def test_formats(data_source_fixture: DataSourceFixture): | |
table_name = data_source_fixture.ensure_test_table(customers_test_table) | ||
|
||
test_definitions = { | ||
"email": { | ||
"passing_values": ["[email protected]", "[email protected]", "[email protected]"], | ||
"failing_values": ["", "a", " ", "1.5", "4,2", "@@@@@"], | ||
}, | ||
"integer": { | ||
"passing_values": ["0", "1234567890", "-0", "- 1234567890", "+0", "+1"], | ||
"failing_values": ["", "a", " ", "1.5", "4,2"], | ||
|
@@ -133,7 +137,7 @@ def test_formats(data_source_fixture: DataSourceFixture): | |
}, | ||
} | ||
|
||
if test_data_source == "sqlserver": | ||
if test_data_source in ["fabric", "sqlserver"]: | ||
test_definitions.pop("percentage") # Partially supported. | ||
test_definitions.pop("date us") # Partially supported. | ||
test_definitions.pop("date eu") # Partially supported. | ||
|
@@ -159,7 +163,7 @@ def assert_format_values(format, data_source_fixture: DataSourceFixture, table_n | |
def set_up_expression(value: str, format: str) -> str: | ||
expression = data_source.get_default_format_expression(f"'{value}'", format) | ||
# Special handling for sqlserver and teradata - expression matching cannot be used in the SELECT statement, so wrap it in CASE ... THEN ... ELSE for this test. | ||
if test_data_source in ["sqlserver", "teradata"]: | ||
if test_data_source in ["sqlserver", "teradata", "fabric"]: | ||
expression = f"CASE WHEN {expression} THEN 1 ELSE 0 END" | ||
|
||
return expression | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.