A Reformat component is used to transform incoming configuration data into a Standard Attribute Description Record.
integer n = 1; integer aggrKey = 0; // Transforms input record into output record. function integer transform() { string searchBool = ""; string saRecord = "<mdex:record xmlns=\"\">"; saRecord = saRecord + "<mdex-property_Key>" + $0.Key + "</mdex-property_Key>"; saRecord = saRecord + "<mdex-property_DisplayName>" + $0.DisplayName + "</mdex-property_DisplayName>"; // Lower case the boolean in the CSV file searchBool = lowerCase($0.TextSearch); saRecord = saRecord + "<mdex-property_IsTextSearchable>" + searchBool + "</mdex-property_IsTextSearchable>"; saRecord = saRecord + "<system-navigation_Sorting>" + $0.SortOrder + "</system-navigation_Sorting>"; $0.xmlString = saRecord + "</mdex:record>"; // Batch up the web service requests. $0.singleAggregationKey = aggrKey; n++; if (n % 15 == 0) { aggrKey++; } return ALL; }
The function builds each Standard Attribute Description Record (SADR) using the configuration data in the input CSV file. Keep in mind that, if you wish, you can add more SADR property definitions; if you do so, be sure to update the input file for the additional input values.
To configure the Reformat component in the standard attribute schema graph:
The two messages listed above should disappear once you configure the Reformat component Edge metadata.