Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there - hopefully this should be a quick one to answer...
I have a set of 10 databases (one for each customer site) with identical structures that need to be pulled together into a single app.
I have managed to consolidate all the tables I need into a single table using concatenation - but I now need to be able to identify which of the ten sources the data came from. For example, is this employee from location x or y?
What do I need to add to my script to specify the location as a dimension that can be used for analysis?
Many thanks
Rob
When you are loading the QVD files, just add the field there.
LOAD *, 'Customer1' as Customer from QVD1;
CONCATENATE LOAD *, 'Customer2' as Customer from QVD2;
.... and so on.
or you can even use LOAD *, filename() as Datasource .... then it will load the QVD file name itself as source. Just in case if you are keeping the customer name/number in the data file name.
When you are loading the QVD files, just add the field there.
LOAD *, 'Customer1' as Customer from QVD1;
CONCATENATE LOAD *, 'Customer2' as Customer from QVD2;
.... and so on.
or you can even use LOAD *, filename() as Datasource .... then it will load the QVD file name itself as source. Just in case if you are keeping the customer name/number in the data file name.
I presume you have done something like this in your script, I have also added the new field.
Table:
Load *,
'Database1' as Source
from Database1.sometable
concatenate (Table)
Load * ,
'Database2' as Source
from Database2.sometable
concatenate (Table)
Load * ,
'Database3' as Source
from Database3.sometable
hope this is of help,
Regards,
Neil
Perfect - thanks guys, that is nice and easy!