Skip to content

Commit

Permalink
Merge pull request #93 from CloudFormations/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
MattPCollins authored Sep 23, 2024
2 parents 579d517 + fefcaaf commit 36bde79
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ----------

Expand Down Expand Up @@ -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 ----------


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)

0 comments on commit 36bde79

Please sign in to comment.