-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRAFT: This scaffolds in the code for running parallel dialect compli…
…ance tests. Setting this up isn't documented anywhere and the implementation here doesn't actually work because the test runner keeps trying to create tables within the catalog.schema in the connection string. Need to research more about why this happens. But wanted to stash this code for now as we'll want to address this for faster compliance test runs in the future. Signed-off-by: Jesse Whitehouse <[email protected]>
- Loading branch information
Jesse Whitehouse
committed
Oct 8, 2023
1 parent
214523b
commit 7b7fe82
Showing
3 changed files
with
22 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from sqlalchemy.testing.provision import create_db, drop_db | ||
|
||
@create_db.for_db("databricks") | ||
def _databricks_create_db(cfg, eng, ident): | ||
with eng.begin() as conn: | ||
create_string = "CREATE SCHEMA `main`.`%s`" % ident | ||
conn.exec_driver_sql(create_string) | ||
|
||
@drop_db.for_db("databricks") | ||
def _databricks_drop_db(cfg, eng, ident): | ||
with eng.begin() as conn: | ||
conn.exec_driver_sql("DROP SCHEMA `main`.`%s`" % ident) |
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