Data Manipulation



  • Joseph

  • Tyler Lamparter Principal Product Manager
    Awesome Follow-up
    Top Contributor
    Answer Pro
    Celigo University Level 4: Legendary

    Joseph you would need grouping on your export to group by the sku and then a transform script to flatten out your structure. You can use Celigo AI to build the script out for you.

    * transformFunction stub:
    * The name of the function can be changed to anything you like.
    * The function will be passed one 'options' argument that has the following fields:
    *   'record' - object {} or array [] depending on the data source.
    *   'settings' - all custom settings in scope for the transform currently running.
    * The function needs to return the transformed record.
    * Throwing an exception will return an error for the record.
    function transform(options) {
      const transformedRecord = {};
      options.record.forEach((item) => {
        transformedRecord.sku = item.Column0;
        transformedRecord[`division${item.Column1}`] = item.Column2;
      return transformedRecord;

Please sign in to leave a comment.