-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into issue-337-redo
Signed-off-by: Jesse Whitehouse <jesse.whitehouse@databricks.com>
- Loading branch information
Showing
15 changed files
with
245 additions
and
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
import os | ||
import re | ||
|
||
workspace_id = os.getenv("DBT_DATABRICKS_HOST_NAME")[4:18] | ||
workspace_re = re.compile(r"^.*-(\d+)\..*$") | ||
hostname = os.getenv("DBT_DATABRICKS_HOST_NAME", "") | ||
matches = workspace_re.match(hostname) | ||
if matches: | ||
workspace_id = matches.group(1) | ||
print(workspace_id) | ||
cluster_id = os.getenv("TEST_PECO_CLUSTER_ID") | ||
uc_cluster_id = os.getenv("TEST_PECO_UC_CLUSTER_ID") | ||
http_path = f"sql/protocolv1/o/{workspace_id}/{cluster_id}" | ||
uc_http_path = f"sql/protocolv1/o/{workspace_id}/{uc_cluster_id}" | ||
|
||
# https://stackoverflow.com/a/72225291/5093960 | ||
env_file = os.getenv("GITHUB_ENV") | ||
env_file = os.getenv("GITHUB_ENV", "") | ||
with open(env_file, "a") as myfile: | ||
myfile.write(f"DBT_DATABRICKS_CLUSTER_HTTP_PATH={http_path}\n") | ||
myfile.write(f"DBT_DATABRICKS_UC_CLUSTER_HTTP_PATH={uc_http_path}\n") |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
databricks-sql-connector>=2.9.3, <3.0.0 | ||
dbt-spark==1.7.1 | ||
databricks-sdk>=0.9.0 | ||
dbt-spark~=1.7.1 | ||
databricks-sdk>=0.9.0, <0.16.0 | ||
keyring>=23.13.0 |
Oops, something went wrong.