2 Replies Latest reply: May 15, 2014 10:01 AM by Grant Perkins RSS

    ?  on Multiple Model Method

    Xanth _

      I've read the "Monarch_9_Learning_Guide.pdf" and "Linked_Objects_Tutorial.pdf" and I just can't seem to get my mind wrapped around the proper method to combine two models for one output.  In my current solution, I use a batch file to call two projects that output their tables to Access and then I have access combine the tabels via a query.  Ideally, I'd like to simply elimintate the need for Access and have Monarch take each of the two data sources and produce one product.  It seems possible, but I cannot seem to make it work.  I appreciate any thoughts or feedback.

       

      VR,

      ______

         /om

        • ?  on Multiple Model Method
          joey

          How do you combine the records into one output in Access in the query?  Is it a simple join query?  Is the join inner or a left/right?  Or do you use a union query? 

           

          How you combine them in Access determines how you combine them in Monarch.  I'm assuming an inner join with different fields and a common unique key.  The other methods are possible to duplicate in Access.

           

          Model 1 has three columns, Key, ColA, and ColB.  Model 2 has three columns, Key, ColC, and ColD.  Your access method has two tables from each model and does an inner join query to output Key, ColA, ColB, ColC, and ColD.

           

          To do this in Monarch:

          -Run the first model first.  Export to Access or a spreadsheet.

          -In the second model, add an external lookup.  The table source will be the output of the first model.  It should match records based on Key, and import ColA, and ColB.

          -The table in the second model now has Key, ColA, ColB, ColC, and ColD.

           

           

          This is a very simple example and I'm sure your model is more complex, but hopefully it illustrates the concept of using two models for one output.

            • ?  on Multiple Model Method
              Grant Perkins

              I'm with Joey on this one although if you want to avoid Access and have too many records for Excel you can simply output to a 'text' file of some sort - fixed width or .csv type according to choice and use that for your lookup.

               

              Thinking along the lines of appending an output from a second process to a first process, so long as you create an output with the same format - and that does not have to be anything like the original source format - you can export everything to a single file (or two files and concatenate) and then use Monarch if necessary to re-read that new combined file and restructure it by sorting or whatever is required.

               

              If you can provide us with an outline specification of what you need to do to get from your two inputs to a single output result I'm sure we can offer some useful suggestions . This sort of thing tends to be quite specific to the data in use so may make more sense against a specific rather than generic requirement.

               

              HTH.

               

               

              Grant