generated from CloudFormations/procfwk
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from CloudFormations/develop
Develop
- Loading branch information
Showing
2 changed files
with
16 additions
and
33 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 |
---|---|---|
|
@@ -38,35 +38,7 @@ | |
|
||
import json | ||
|
||
# payload = json.loads(dbutils.widgets.get("Notebook Payload")) | ||
payload = { | ||
"ComputeWorkspaceURL": "https://adb-3718702953738155.15.azuredatabricks.net", | ||
"ComputeClusterId": "0428-080256-zv6uka2b", | ||
"ComputeSize": "Standard_D4ds_v4", | ||
"ComputeVersion": "14.3.x-scala2.12", | ||
"CountNodes": 1, | ||
"ComputeLinkedServiceName": "Transform_LS_Databricks_Cluster_MIAuth", | ||
"ComputeResourceName": "cumulusdatabricksdev", | ||
"ResourceGroupName": "CumulusFrameworkDev", | ||
"SubscriptionId": "1b2b1db2-3735-4a51-86a5-18fa41b8bb49", | ||
"CuratedStorageName": "cumulusframeworkdev", | ||
"CuratedContainerName": "curated", | ||
"CleansedStorageName": "cumulusframeworkdev", | ||
"CleansedContainerName": "cleansed", | ||
"CuratedStorageAccessKey": "cumulusframeworkdevcuratedaccesskey", | ||
"CleansedStorageAccessKey": "cumulusframeworkdevcleansedaccesskey", | ||
"DatasetName": "WordDictionary", | ||
"SchemaName": "Dimensions", | ||
"BusinessLogicNotebookPath": "/Workspace/Repos/[email protected]/CF.Cumulus/src/azure.databricks/python/notebooks/transform/businesslogicnotebooks/Dimensions/WordDictionary", | ||
"ExecutionNotebookPath": "/Workspace/Repos/[email protected]/CF.Cumulus/src/azure.databricks/python/notebooks/transform/CreateDimensionTable", | ||
"ColumnsList": "WordIndex,English,Hiragana,Kanji,DateAdded,Rank,Active", | ||
"ColumnTypeList": "INTEGER,STRING,STRING,STRING,DATE,INTEGER,INTEGER", | ||
"SurrogateKey": "WordDictionaryId", | ||
"BkAttributesList": "WordIndex", | ||
"PartitionByAttributesList": "", | ||
"LoadType": "I", | ||
"LastLoadDate": "2024-06-21T09:03:29.9233333Z" | ||
} | ||
payload = json.loads(dbutils.widgets.get("Notebook Payload")) | ||
|
||
# COMMAND ---------- | ||
|
||
|
@@ -166,7 +138,3 @@ | |
# add loadtype to sp results + variables | ||
# rename existing loadType to loadAction in the prevtests | ||
tableExists = checkExistsDeltaTable(tablePath = curatedTablePath, loadAction = loadType, loadType = loadType) | ||
|
||
# COMMAND ---------- | ||
|
||
|
15 changes: 15 additions & 0 deletions
15
src/azure.databricks/python/notebooks/transform/businesslogicnotebooks/CustomersAddresses.py
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,15 @@ | ||
# Databricks notebook source | ||
strSQL = """ | ||
SELECT | ||
c.CustomerID, | ||
c.CompanyName, | ||
REPLACE(c.SalesPerson, 'adventure-works\', '') AS SalesPerson, | ||
CASE WHEN ca.AddressType IS NULL THEN 'Not Specified' ELSE ca.AddressType END AS AddressType | ||
FROM hive_metastore.adventureworkssqlserver.salesdemo_customer AS c | ||
LEFT JOIN hive_metastore.adventureworkssqlserver.SalesDemo_CustomerAddress AS ca | ||
ON c.CustomerID = ca.CustomerID | ||
""" | ||
|
||
# COMMAND ---------- | ||
|
||
dbutils.notebook.exit(strSQL) |