1

My source data set contains a table of records, with columns "code", "name" and "parent".

The "code" column contains the unique record key, the "name" contains a text value, and "parent" holds a foreign key pointing back to the "code" column. This table structure is used to allow records to be structured as a hierarchy, where each record can have at most a single parent.

How do I model this in the LDM for GoodData? Currently, I have captured the "code" as a connection point, and "name" as a label, but I'm uncertain what to do with the "parent". Attempting to create a circular connection produces an error message "a cycle has been detected" in the CloudConnect problems window.

Pat
  • 409
  • 4
  • 15

1 Answers1

1

You have to split it into two datasets "User" and "Parent". Both datasets have same columns "code" (connection point) and "name" (this may be attribute or label) and there is a reference: Parent-User

Or you can join parent name in the ETL and you create just one datasets wit columns "code","name","parent name"

enter image description here

Josef Pithart
  • 276
  • 1
  • 4
  • Unfortunately, while the first option appears sensible, it doesn't make much sense when the number of additional columns is larger than just the "name" I described initially. In reality, there are another 30+ columns in each record which I'm interested in representing, and it seems I'd end up having to duplicate this within both the "user" and "parent" entities? Also, I don't think the arrangement you've suggested would allow me to easily traverse the records, to do things such as compute the number of children of a given record? – Pat Mar 01 '14 at 02:54