-
Notifications
You must be signed in to change notification settings - Fork 1
/
DataVault-HUB.txt
64 lines (60 loc) · 2.86 KB
/
DataVault-HUB.txt
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Shopify HUB
HUB is a central concept that plays a significant role in organizing and managing data. It acts as a central repository for core entities.
It assigns a unique business key (usually a natural key) to each entity, allowing for easy tracking and integration.
It also helps in Elimination of Redundancy,Data Lineage and Traceability etc.
create or replace TABLE database.schema.CUSTOMERS_HUB (
CUSTOMERS_HK BINARY(8388608) NOT NULL,
CUSTOMERS_ID NUMBER(38,0),
SOURCE_SYSTEM VARCHAR(100),
LDTS TIMESTAMP_NTZ(9),
constraint PK_CUSTOMERS_HUB primary key (CUSTOMERS_HK)
);
-----------------------------------------------------------------------------------------------------------------
create or replace TABLE database.schema.CUSTOMER_ADDRESSES_HUB (
CUSTOMERS_ADDRESS_HK BINARY(8388608) NOT NULL,
CUSTOMERS_ADDRESS_ID NUMBER(38,0),
SOURCE_SYSTEM VARCHAR(100),
LDTS TIMESTAMP_NTZ(9),
constraint PK_ADDRESS_HUB primary key (CUSTOMERS_ADDRESS_HK)
);
-----------------------------------------------------------------------------------------------------------------
create or replace TABLE database.schema.ORDERS_HUB (
ORDERS_HK BINARY(8388608) NOT NULL,
ORDER_ID NUMBER(38,0),
SOURCE_SYSTEM VARCHAR(100),
LDTS TIMESTAMP_NTZ(9),
constraint PK_ORDERS_HUB primary key (ORDERS_HK)
);
-----------------------------------------------------------------------------------------------------------------
create or replace TABLE database.schema.ORDERS_LINE_ITEMS_HUB (
LINE_ITEMS_HK BINARY(8388608) NOT NULL,
LINE_ITEMS_ID NUMBER(38,0),
SOURCE_SYSTEM VARCHAR(100),
LDTS TIMESTAMP_NTZ(9),
constraint PK_ORDERS_LINE_ITEMS_HUB primary key (LINE_ITEMS_HK)
);
-----------------------------------------------------------------------------------------------------------------
create or replace TABLE database.schema.ORDER_TRANSACTIONS_HUB (
TRANSACTIONS_HK BINARY(8388608) NOT NULL,
TRANSACTIONS_ID NUMBER(38,0),
SOURCE_SYSTEM VARCHAR(100),
LDTS TIMESTAMP_NTZ(9),
constraint PK_ORDER_TRANSACTIONS_HUB primary key (TRANSACTIONS_HK)
);
-----------------------------------------------------------------------------------------------------------------
create or replace TABLE database.schema.PRODUCTS_HUB (
PRODUCTS_HK BINARY(8388608) NOT NULL,
PRODUCTS_ID NUMBER(38,0),
SOURCE_SYSTEM VARCHAR(100),
LDTS TIMESTAMP_NTZ(9),
constraint PK_PRODUCTS_HUB primary key (PRODUCTS_HK)
);
-----------------------------------------------------------------------------------------------------------------
create or replace TABLE database.schema.PRODUCTS_VARIANTS_HUB (
VARIANTS_HK BINARY(8388608) NOT NULL,
VARIANTS_ID NUMBER(38,0),
SOURCE_SYSTEM VARCHAR(100),
LDTS TIMESTAMP_NTZ(9),
constraint PK_PRODUCTS_VARIANTS_HUB primary key (VARIANTS_HK)
);
-----------------------------------------------------------------------------------------------------------------