Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do I create a new calculated dimension from the sql load script?
I am loading date from sql query and would like to calculate week during load.
The below code works, but I cannot see WorkWeek as a dimension after load completes.
SELECT Epi_Lot.Start_Date
FROM BlueDB.dbo.table;
Let WorkWeek = Week(start_date);
You can do the same thing on your script
LOAD *,
Week(Start_Date) as WorkWeek;
SQL
SELECT Epi_Lot.Start_Date
FROM BlueDB.dbo.table;
Hope this helps
Regards
Pablo
you can try this
MainTable:
SELECT Epi_Lot.Start_Date
FROM BlueDB.dbo.table;
Week: | ||
Load distinct | ||
Week(Start_Date) AS Week, | ||
Resident MainTable;
here is an image of something similar
LOAD
*,
Week(Start_Date) AS Week;
SELECT
Epi_Lot.Start_Date,
FROM BlueDB.dbo.table;
This works! The examples helped. Thanks everyone.
That's great Susan.
You need to mark the correct answer to help others in the community find the correct answers to similar questions