This post explains about a Rule which copies data from one cube to another cube.

Let us start with defining two cubes.
1) Cube A
2) Cube B

In which Cube A has the following dimensions

a) A_dim1 and A_dim1 has 3 elements namely A_elm11, A_elm12, A_elm13
b) A_dim2 and A_dim2 has 3 elements namely A_elm21, A_elm22, A_elm23
c) A_dim3 and A_dim3 has 3 elements namely A_elm31, A_elm32, A_elm33
d) A_dim4 and A_dim4 has 3 elements namely A_elm41, A_elm42, A_elm43
e) A_dim5 and A_dim5 has 3 elements namely A_elm51, A_elm52, A_elm53

Cube B consists of the following dimensions which are specified below:

a) B_dim1 and B_dim1 has 3 elements namely B_elm11, B_elm12, B_elm13
b) B_dim2 and B_dim1 has 3 elements namely B_elm21, B_elm22, B_elm23
c) B_dim3 and B_dim1 has 3 elements namely B_elm31, B_elm32, B_elm33
d) B_dim4 and B_dim1 has 3 elements namely B_elm41, B_elm42, B_elm43
e) B_dim5 and B_dim1 has 3 elements namely A_elm51, A_elm52, A_elm53

now we write a rule to copy cube B data into Cube A.

NOTE: In order to copy Cube B data into Cube A, our rule should be written in Cube A and the feeder should be written in Cube B.

So open Cube A and write the rule in it.

The Rule will look similar to the below mentioned code:

['A_elm51']=N: DB('Cube B',!A_dim1, !A_dim2, !A_dim3, !A_dim4, !A_dim5);

After completion of writing a rule in the destination cube (which is Cube A), we need to go to the source cube (which is cube B) and write a Feeder in the source cube in order to feed the values into Cube A.

So go to the cube B and write a Feeder
Now the Feeder looks like the below code:

['A_elm51'] => N: DB('Cube A', !B_dim1, !B_dim2, !B_dim3, !B_dim4, !B_dim5);

Now check the data.

What ever data exists in the element A_elm51 in Cube B is now copied into A_elm51 in Cube A.


Read this aritcle completely...

Blog Widget by LinkWithin