Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating custom dimensions

I have a requirement where I have data as

IDName
1Pa
1as
3asa
3wer
3asssc
2aaw

I Want a dimension that would be like Pro1 for ID as 1, Pro2 for ID as 2, Pro3 for ID as 3

8 Replies
sunny_talwar

May be this as your calculated dimension:

Pick(ID, 'Pro1', 'Pro2', 'Pro3')

or

Pick(Match(ID, 1, 2, 3), 'Pro1', 'Pro2', 'Pro3')

or

'Pro' & ID

Not applicable
Author

I have around lakhs of ID's which would need me to add all the id and their respective names is there not a way where in the Names are give on the basis by grouping all the similar ID's as "Pro"+"id"

reddy-s
Master II
Master II

Hi Shashank,

As you say that there are loads of records to modify, I would suggest you to do it in the load using an ApplyMap or simply make use of the last option which Sunny T mentioned in your load statement.

data:

Load 'Pro' & ID,

         name

       from ........

Anonymous
Not applicable
Author

may be like this?

load distinct *,

concat('Pro',ID) as ID

from

TableName;

Not applicable
Author

Is there no way to create a dimension itself and not performing data load for that dimension

sunny_talwar

Yes there is and that way is to use a calculated dimension. If you don't want to use either of them, then I am afraid there is no 3rd way here.

reddy-s
Master II
Master II

Hi Shashank,

I would suggest you to create the dimension in the load itself as that would improve your performance.

sunny_talwar

I agree with Sangram