Discussion:
Iterating over many items using Taddm connector
(too old to reply)
monnewbie3
2019-11-13 19:28:40 UTC
Permalink
Hello, I'm using the taddm connector in NON idml mode to iterate over classes that have an implicit relationship(s), these relationships are one to many.
I'm unable to retrieve all the child records, only one of them.
Each one of these implicit relationships contains a $cycle value.
I'm outputting these values with the JSON parser to a file.

For example : Grouping patterns have many selectors.
I'm able to get the groupingpattern no problem, but I'm only able to return the first selector.

I think I'm missing something simple that I can't quite put my finger on, Any help would be great! Thanks
Eddie Hartman
2019-11-14 09:36:21 UTC
Permalink
Post by monnewbie3
Hello, I'm using the taddm connector in NON idml mode to iterate over classes that have an implicit relationship(s), these relationships are one to many.
I'm unable to retrieve all the child records, only one of them.
Each one of these implicit relationships contains a $cycle value.
I'm outputting these values with the JSON parser to a file.
For example : Grouping patterns have many selectors.
I'm able to get the groupingpattern no problem, but I'm only able to return the first selector.
I think I'm missing something simple that I can't quite put my finger on, Any help would be great! Thanks
It's been a while since I worked with TADDM, but let me ask this: is your problem that you don't see the links, or that you have trouble dealing with the JSON? If you can share a bit of that JSON payload maybe it will shed some light.

/Eddie
monnewbie3
2019-11-14 10:58:42 UTC
Permalink
Post by Eddie Hartman
Post by monnewbie3
Hello, I'm using the taddm connector in NON idml mode to iterate over classes that have an implicit relationship(s), these relationships are one to many.
I'm unable to retrieve all the child records, only one of them.
Each one of these implicit relationships contains a $cycle value.
I'm outputting these values with the JSON parser to a file.
For example : Grouping patterns have many selectors.
I'm able to get the groupingpattern no problem, but I'm only able to return the first selector.
I think I'm missing something simple that I can't quite put my finger on, Any help would be great! Thanks
It's been a while since I worked with TADDM, but let me ask this: is your problem that you don't see the links, or that you have trouble dealing with the JSON? If you can share a bit of that JSON payload maybe it will shed some light.
/Eddie
Thanks for the reply Eddie;

I can see the data links inside of the TADDM connector (it's set to Depth 3), the problem is that it only fetches 1 row of many.
Every time a loop should happen, inside of the data connector exists an attribute called $cycle.
In the IBM docs is says this:
The $cycle attribute is used when a loop in the TADDM data is detected

Here's some JSON for a grouping pattern, everything is good except when it hits the selector:
{

"displayName":"GroupingPatternName",
"$classType":"customCollection.GroupingPattern",
"$implicit": {
// This should technically be an array of selectors, but is an object
"selectors": {
"$id":"A6B3294A8AA93F95AF54BB212BEC3FD8",
"guid":"A6B3294A8AA93F95AF54BB212BEC3FD8",
"displayName":"I am A Selector (1 of 3)"
}

}


}

I would assume there is some way to iterate over these records when I encounter the $cycle attribute.

Thanks again,
monnewbie3
2019-11-14 11:05:32 UTC
Permalink
Also on a side note; When I use the debugger and step through the data I see the same thing represented in the json file (albeit with more attributes, but the selector remains a single object)
Eddie Hartman
2019-11-15 10:04:02 UTC
Permalink
Post by monnewbie3
Also on a side note; When I use the debugger and step through the data I see the same thing represented in the json file (albeit with more attributes, but the selector remains a single object)
Can't you use the $id to select the related object(s)?

/Eddie
monnewbie3
2019-11-15 10:34:03 UTC
Permalink
Hey Eddie,

I'm unfamiliar if there is a method available to fetch the next record in that iteration (and by default they just return the first record?). If there is something I'm missing please let me know.
From the IBM docs for the taddm connector (not sure if this helps) ;

The $cycle attribute is used when a loop in the TADDM data is detected. If you list the content of the first item, you get the second item, through the forward implicit attribute.

Thanks again
Eddie Hartman
2019-11-21 15:04:26 UTC
Permalink
Post by monnewbie3
Hey Eddie,
I'm unfamiliar if there is a method available to fetch the next record in that iteration (and by default they just return the first record?). If there is something I'm missing please let me know.
From the IBM docs for the taddm connector (not sure if this helps) ;
The $cycle attribute is used when a loop in the TADDM data is detected. If you list the content of the first item, you get the second item, through the forward implicit attribute.
Thanks again
The TADDM Connector lets you specify an MQL statement to search for data:

https://ibm.software.network.directory-integrator.narkive.com/mBrsSGsK/taddm-connector-mql-select-question

So you could combine the use of the Connector-Loop with TADDM Connectors, leveraging the Parameter Map to dynamically build the MQL you need.

/Eddie

Loading...