Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i wanted to reduce rows while loading from excel. I tried Using enable transformation and conditional delete but I ended up with a code as below,
INPUT:
member_biz_key | age | gender |
1 | 10 | A |
2 | 20 | B |
3 | 30 | C |
4 | 40 | D |
CODE:
LOAD member_biz_key,
age,
gender
FROM
Member.xlsx
(ooxml, embedded labels, table is Sheet1, filters(
Remove(Row, RowCnd(Interval, Pos(Top, 2), Pos(Top, 3), Select(1, 3)))
));
OUTPUT:
member_biz_key | age | gender |
2 | 20 | B |
3 | 30 | C |
4 | 40 | D |
Can someone explain how it works ?
Thanks!
try like this:
INPUT:
LOAD * INLINE [
member_biz_key, age, gender
1, 10, A
2, 20, B
3, 30, C
4, 40, D
] where gender<> 'A';
Hi,
Actually I wanted to know the functionality of this smaller input on how it works. But I have so much records in my project.
Thanks for your answer anyways.
thanks stefan
Hi,
One more doubt is, how do I load only the data like this as output ?
input:
member_biz_key | age | gender |
1 | 10 | A |
2 | 20 | B |
3 | 30 | C |
4 | 40 | D |
Output: ONLY THE PARTICULAR FIELDS WITH DATA:
age | gender | |
30 | C | |
40 | D |
If you don't want the member_biz_key field, just remove it from the LOAD statement.
What's the rule behind loading only these two rows? Is it based on age, gender, both or row number?
Hi stefan,
It is like just an example that i want to load only the particular data. i.e;data from A1 to C5 in above table - Load only from cell B4(age 30) in excel to C5(gender D) removing A column and first 2 records of B cells and C cells as well..