Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
You don't have to remove synthetic keys, but having them makes your data model a little complicated to comprehend. Look at this blog:
HTH
Best,
Sunny
Hi,
check with this it might help u.
Rename ComapnyID in Item Table
Rename Volume in Transactions Table (if not being used) else u can rename it from Item table.
Concatenate WarehouseID & CompanyID to make a single Key field.
Customer & Branch as well you make a key to void synthetic keys.
hi,
Transactions:
load
*,
Company_ID & Warehouse_ID & ITEM_ID & Volume & CUSTOMER_ID & BRANCH_ID as Key1
from transactiontable;
Dates:
load
*
from Datestable;
Company:
load
* from companytable;
Warehouse:
load
*,
company_ID & Warehouse_ID as Key2
from
warehousetable;
items:
load
*,
Company_ID & ITEM_ID as Key3
from Itemstable;
Customer:
load
*,
Company_ID & Customer_ID as Key4
from CustomerTable;
Branch:
load
*,
Branch_ID & Company_ID as Key5
from branch table;
link_Table:
load
distinct
Company_ID & Warehouse_ID & ITEM_ID & Volume & CUSTOMER_ID & BRANCH_ID as Key1,
Company_ID ,Warehouse_ID, ITEM_ID ,Volume ,CUSTOMER_ID ,BRANCH_ID
from transactiontable;
concatenate(link_Table)
load distinct
Company_ID from datestable;
concatenate(link_Table)
load distinct
Company_ID from companytable;
concatenate(link_Table)
load distinct
company_ID & Warehouse_ID as Key2,
company_ID ,Warehouse_ID from warehousetable;
concatenate(link_Table)
load distinct
Company_ID & ITEM_ID as Key3,
Company_ID ,ITEM_ID
from Itemstable;
concatenate(link_Table)
load distinct
Company_ID & Customer_ID as Key4,
Company_ID,Customer_ID
from customertable;
concatenate(link_Table)
load distinct
Branch_ID & Company_ID as Key5,
Branch_ID , Company_ID from branchtable;
Regards
$@M
Use Qualify statement to use fully qualified names on non key fields.
if CompanyID is the key filed that is joining all the tables then you could use
Qualify VOLUME,ITEM_ID,CUSTOMER_ID; before the load statements.
what this will do is to create fields in the tables as follows
customer.CUSTOMER_ID
items.ITEM_ID
hth
Sasi
HIC