Forum Discussion

ayush_vipul's avatar
ayush_vipul
New Contributor III
7 years ago
Solved

Accessing one expression library functions from another expression lib

Hi I have a use case where I am looking forward to access methods of one library(expression file) from another library (expression file 2). Is their a way to achieve this?
  • tstack's avatar
    tstack
    7 years ago

    Since the CSV Formatter currently doesn’t work with arrays, you will need to use a child pipeline that splits the array into separate docs that go into a CSV Formatter.

    I’m attaching a couple of pipelines to demonstrate this flow:

    FormatArrayToCSV_2019_02_28.slp (5.6 KB)
    WriteCSVFiles_2019_02_28.slp (5.4 KB)

    The FormatArrayToCSV pipeline is the child. It splits the “$array” property in the incoming document and then passes the results to a CSV Formatter and FileWriter. You’ll need to change the JSON Splitter to split your array property.

    The WriteCSVFiles pipeline is the parent. It just contains some mock data and feeds it into the child pipeline.