Multiple foreign keys for ActiveRecordResolver

9 views
Skip to first unread message

Torsten Becker

unread,
Jun 8, 2009, 12:44:11 PM6/8/09
to activewareh...@googlegroups.com
Using ActiveWarehouse, I have created a dimension that is dependent on
two foreign keys :plant and :material.

How can I find the right dimension, as the resolver only uses one
value? Or are there any other solutions?

Torsten


Thibaut Barrère

unread,
Jun 9, 2009, 7:29:56 AM6/9/09
to ActiveWarehouse Discuss
Hi Torsten,
I don't think there is a built-in lookup stuff for more than one
field.

You could either concatenate the two foreign keys to create some
composite key and look-up by that if it's acceptable, otherwise you
could hack your own resolver.

Have a look here [1] to see how to implement your own resolver (it's
probably a matter of duplicating the existing SqlResolver or
ActiveRecordResolver to do what you need).

hth,

-- Thibaut

[1]
http://github.com/aeden/activewarehouse-etl/blob/1001b66a01cc083833c331a968dd60924ab90f9e/lib/etl/transform/foreign_key_lookup_transform.rb#L81
Reply all
Reply to author
Forward
0 new messages