How to create 2 different tables with different traps and information from 1 file on Altair Monarch Classic and then export in Excel format as 2 different tabs

Manan Nisar
Manan Nisar Altair Community Member
edited May 24 in Community Q&A

Hello Everyone,
I'm working on 1 text file and I would like to retrieve 2 different tables with completely different information from that same 1 text file. There is no similarity in the data being extracted. Both the tables are completely independent. Also, after retrieving the tables, I want to export in Excel format as 2 different tabs in the same excel sheet. Can anyone help me in retrieving the information from the text file as 2 different tables. Appreciate for the help in advance. Thank you!!

Tagged:

Best Answer

  • Nicholas_21406
    Nicholas_21406
    Altair Employee
    edited May 24 Answer ✓
    • Yes the same Classic.prn file is used for both load plans.  If you had two different ways of pulling data from the same file, you would have to have two different .dmod model files describing those two different ways.
    • In Data Prep Studio (DPS), you would first load one of the models

    image

    • And then the your report to the load plan associated with that model

    image

    • And then add the model associated with the other way of pulling data from the report.

    image

    • This will give you your second load plan, which you would then need to add the same report to.

    image

     

    • Then select the Export button and add an export for each of your Loadplans, configuring them as shown in my previous post.

    image

    • Make sure and save your workspace when you exit.
    • In the future if you need to run the workspace with other input files, just load the same workspace and then edit the file path for each load plan to point to your latest report:

    image

Answers

  • Nicholas_21406
    Nicholas_21406
    Altair Employee
    edited May 14

    Hi Manan,

    • I don't know how you could do this with Monarch Classic, but with Monarch Data Prep Studio (DPS), it is straightforward.
    • I am attaching a workspace (I had to rename the file from twoExcelTabsFromOneInput.dpwx to twoExcelTabsFromOneInput.dpwx.txt in order to attach it - please rename it back to twoExcelTabsFromOneInput.dpwx before using it) which uses two separate load plans, for two separate models (and autodefined model and Lesson9.dmod), both applied to the same input file (Classic.prn), and exports to two different sheets of the same spreadsheet (Lesson9.xlsx, sheets "Classic" and "Lesson9").
    • Note that the first export overwrites the Lesson9.xlsx file if it exists, and the second one appends to it, each of these exports exporting to a different "Table"/sheet.
    • Note you should have Classic.prn and Lesson9.dmod already available to you as sample files that are included with the product.

    image

     

    image

    image

    image

    image

     

  • Manan Nisar
    Manan Nisar Altair Community Member
    edited May 14

    Hello Nicholas,
    Appreciate your help. 
    I just wanted to confirm. Is the Classic.pm file you're using the same file? Also, I want to create a model and every day I will have the similar file but with different data to feed into the model, Will the file be changed for both the Data outputs? Also, Do I need to have to change the sources every time I have to feed into the file. I'm trying the method you referred me. But let me know how to change the file every day and create a model for this. I appreciate your help!

  • Nicholas_21406
    Nicholas_21406
    Altair Employee
    edited May 24 Answer ✓
    • Yes the same Classic.prn file is used for both load plans.  If you had two different ways of pulling data from the same file, you would have to have two different .dmod model files describing those two different ways.
    • In Data Prep Studio (DPS), you would first load one of the models

    image

    • And then the your report to the load plan associated with that model

    image

    • And then add the model associated with the other way of pulling data from the report.

    image

    • This will give you your second load plan, which you would then need to add the same report to.

    image

     

    • Then select the Export button and add an export for each of your Loadplans, configuring them as shown in my previous post.

    image

    • Make sure and save your workspace when you exit.
    • In the future if you need to run the workspace with other input files, just load the same workspace and then edit the file path for each load plan to point to your latest report:

    image

  • Manan Nisar
    Manan Nisar Altair Community Member
    edited May 14

    How do you save a table because currently its showing Doesn't exist.

     

  • Nicholas_21406
    Nicholas_21406
    Altair Employee
    edited May 15

    That message is just saying that file doesn't exist yet - if you run the exports, then the file will get created.

  • Manan Nisar
    Manan Nisar Altair Community Member
    edited May 15

    Thank you so much Nicholas, Appreciate your help. I was able to get the data required. 
    Could you please help me how to create a model file so every time I can just feed in the information and get the data from the set model. 

  • Nicholas_21406
    Nicholas_21406
    Altair Employee
    edited May 15

    You're quite welcome Manan,

    You would create a model file using Monarch Classic.  We can set up an onboarding call for you if you are unfamiliar with how to do that.

    If interested, please file a Support ticket requesting this.

  • Manan Nisar
    Manan Nisar Altair Community Member
    edited May 15

    Yes, for sure, I would like to learn more about it. I will raise a support ticket and connect with the customer support. But how will we create a model in Monarch classic and use it to give us the data as we want from Data Prep?

  • Nicholas_21406
    Nicholas_21406
    Altair Employee
    edited May 15

    Model files are stored as .dmod files - when you save one you have created in Monarch Classic, it is saved as a .dmod file - when you select a model in Data Prep Studio, you will select the .dmod file you have created.

    image

    image

     

  • Rebecca_Cronin
    Rebecca_Cronin
    Altair Employee
    edited May 20

    Thank you so much Nicholas, Appreciate your help. I was able to get the data required. 
    Could you please help me how to create a model file so every time I can just feed in the information and get the data from the set model. 

    Hi @Manan Nisar ,

    You can also create a Workspace that captures the data from the one file applying two passes creating 2 load plans that you can then join/export the results. You may connect with DA Customer Success Team for your complimentary On-boarding/Working Sessions

    Kindly,

    Rebecca, Customer Success Team