-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1_setup.py
More file actions
31 lines (23 loc) · 739 Bytes
/
1_setup.py
File metadata and controls
31 lines (23 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Databricks notebook source
# MAGIC %md
# MAGIC ## Create the Catalog
# COMMAND ----------
# MAGIC %sql
# MAGIC
# MAGIC CREATE CATALOG IF NOT EXISTS fmcg;
# MAGIC use catalog fmcg;
# COMMAND ----------
# MAGIC %md
# MAGIC ### Create schema
# MAGIC Silver and bronze schema are for child company (Sportbar) and Altikon is parent company
# MAGIC Gold schema will contain data from both parent and child company
# COMMAND ----------
# MAGIC %sql
# MAGIC
# MAGIC CREATE SCHEMA IF NOT EXISTS fmcg.gold;
# MAGIC CREATE SCHEMA IF NOT EXISTS fmcg.silver;
# MAGIC CREATE SCHEMA IF NOT EXISTS fmcg.bronze;
# COMMAND ----------
# MAGIC %sql
# MAGIC -- check how many records in fact tables
# MAGIC select count(*) from fmcg.gold.fact_orders;