2 Replies Latest reply: Apr 10, 2018 9:30 AM by Ricardo Cao RSS

    Need Help - Outputting filename with part of column value

    Ricardo Cao

      Hi Everyone,

       

      I am a new Datawatch user and have been using Data Prep Studio version 14.2.

       

      I have created a Workspace File which cleans up a file and outputs a summary table grouped by the column 'Group Name'.

          The Group Name column contains values such as: A1, A2, B1, B2, etc...

       

      Current problem: I need to output the same report for each of the groups (currently have over 20 groups) on separate files (1 file per group). I have not been able to figure out how to create the outputs such that the filenames are as follows ('Groupname' Summary.xlsx).


      GOAL: Looking for a way to append the GroupName column as part of the filename.

      For example:
          A1 summary.xlsx

          A2 summary.xlsx

          etc...

       

      Is there any way to achieve this result using a Workspace? (I also have Datawatch Server 14 available, if there is a way to do it there).

      If I am not able to achieve the result with a Workspace can it be done with a Model?

       

      Appreciate any help!

      R

        • Re: Need Help - Outputting filename with part of column value
          Steve Caiels

          Hi Ricardo,

           

          I don't believe this is currently available in a workspace.  However, it is an option in a Summary Export in a model.

           

          1.     Export your grouped table in Data Prep Studio to Excel, csv. Access, pdf or any format accessible by Monarch Classic.  CSV, Excel, Access etc is probably easier than PDF or Text as you won't have to build an report extraction template, but there can be issues with data types such as dates, leading zeros on 'numeric' data etc that you will have more control over from a report format.

           

          From a database format (Access, Excel, csv etc), use the Open Database option in Monarch Classic.

          From PDF or fixed text, use the open report option and build a detail template.

           

          2.     Once you are happy with the table, go to the summary window and create a new summary.

          • Make sure that the field you want to use to name your output is the first key field in the summary,
          • Your other fields can probably be Item fields.  This will give you the greatest flexibility in the order of placement.
          • I assume you won't need to summarise the data as this would have already been done in Data Prep Studio. If you do, however, you need to add the field you want to summarise as a measure.

           

          3.     At this stage, the summary should look exactly the same as the table (and the grouped data in Data Prep Studio).

           

          4. Now onto the solution!  As you go through the export wizard, look out for the Split option and select Automatic naming by files.

           

          That should do it.

           

          Once you are happy that everything is working as you want, you can automate this by incorporating both the workspace and model into a single Visual Process.

           

          Regards,

          Steve.