Forum Discussion

wahlborn's avatar
wahlborn
New Contributor II
6 years ago
Solved

Assistance requested creating pipeline for SQL query-->mapper-->text file

My goal is to execute a SQL query, return data, and format it so that it is accepted by a custom app we run here. So far, I have extracted the necessary data and formatted it using a mapper. The ma...
  • cjhoward18's avatar
    cjhoward18
    6 years ago

    @wahlborn

    Here is a new slp which includes two new solutions to your problem, more optimized than the one given above earlier.

    The solution using the pivot snap sorts by the column names, which might not result in the same order as coming in. It works now because the columns are C, D, E. But, if the last three columns in the real thing are not alphabetical, it might not work like you want.

    The solution using the mapper snaps does not have the problem listed above. So, depending on your desired behavior you can choose and play with the solutions to fit your use case.

    Also note, these solutions are using the actual column names themselves that are to be collected and written out, so if those plan to change this will need to be edited accordingly to handle that.

    PivotQuestion_2019_08_29.slp (14.6 KB)