Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I am trying to add my new field to be added in current table (Field Time). However my previous data source do not have this field. I need to read my old data source (without new field), and new data source with (new field).
May I know the best way to added this new field into current table so that it will not impact the performance of reloading the qvw.
Below are my table :
FactTable:
LOAD
ID,
Date,
UserName,
Age,
Time //newfield
FROM
[..\..\..\DataSource\Test\Excel1_*.xls]
//(html, codepage is 1252, embedded labels, table is @1);
Concatenate(FactTable)
LOAD
ID,
Date,
UserName,
Age,
Time //newfield
FROM
[..\..\..\DataSource\Test\Excel2_*.xls]
//(html, codepage is 1252, embedded labels, table is @1);
Assuming that Excel1 is your old datasource and Excel2 as new, you might be able to do something like this:
FactTable:
LOAD
ID,
Date,
UserName,
Age,
Null() as Time //newfield
FROM
[..\..\..\DataSource\Test\Excel1_*.xls]
//(html, codepage is 1252, embedded labels, table is @1);
Concatenate(FactTable)
LOAD
ID,
Date,
UserName,
Age,
Time //newfield
FROM
[..\..\..\DataSource\Test\Excel2_*.xls]
//(html, codepage is 1252, embedded labels, table is @1);
Assuming that Excel1 is your old datasource and Excel2 as new, you might be able to do something like this:
FactTable:
LOAD
ID,
Date,
UserName,
Age,
Null() as Time //newfield
FROM
[..\..\..\DataSource\Test\Excel1_*.xls]
//(html, codepage is 1252, embedded labels, table is @1);
Concatenate(FactTable)
LOAD
ID,
Date,
UserName,
Age,
Time //newfield
FROM
[..\..\..\DataSource\Test\Excel2_*.xls]
//(html, codepage is 1252, embedded labels, table is @1);
Hi Sunny,
Thanks for reply
Just fyi Excel 1 & 2 are different table. There will be new field in both excel.
If both of them will have the field then what you originally had should work:
FactTable:
LOAD
ID,
Date,
UserName,
Age,
Time //newfield
FROM
[..\..\..\DataSource\Test\Excel1_*.xls]
//(html, codepage is 1252, embedded labels, table is @1);
Concatenate(FactTable)
LOAD
ID,
Date,
UserName,
Age,
Time //newfield
FROM
[..\..\..\DataSource\Test\Excel2_*.xls]
//(html, codepage is 1252, embedded labels, table is @1);
What exactly was the issue when you used the code you posted?
Hi Sunny,
The issue is my previous data, does not contain the new field which is Time. So when I reload the qvw, it prompts error.(Field not found)