9 Replies Latest reply on May 1, 2021 1:33 AM by Rajan Rath

    How to: Read an XML file from a network drive?

    New Member

       

      Please forgive me for such a noobie question, my company has tasked me with doing some work with PowerCenter and I have not yet been to training. I've designed a workflow that will take an XML input source and use it to load an Oracle table.  The XML input file will reside on a network accessable drive. Do I have to upload it to PowerCenter in order to use it as a source for my workflow?  How can I have a workflow that checks this directory on a schedule and looks for an updated file to process? Can anyone point me to the correct PowerCenter Document and concept so I can read up on this?

       

       

      We are using PowerCenter 8.6.1.  Any reply would be appreciated.

       

       

      MG

       

       

        • 1. Re: How to: Read an XML file from a network drive?
          Active Member

          You could either put it in the Source File directory - which would by default be informatica server/infa_shared/SrcFiles  and provide the name of the file in the session or put the shared location where your file resides while configuring the session.

           

          Regarding running the session when the file update -> you could create a filewatch event as part of your workflow and on success of this event, execute the actual session that reads the XML file and processes the same.

           

          To wait for a predefined event in the workflow:

           

          1.  Create an Event-Wait task and double-click the Event-Wait task to open it.

           

          2.  In the Events tab of the task, select Predefined.

           

          3.  Enter the path of the indicator file.

           

          4.  If you want the Integration Service to delete the indicator file after it detects the file, select the Delete Filewatch File option in the Properties tab.

           

          5.  Click OK.

           

           

          Hope this helps.

           

          Regards,

          Sowmya

          1 of 1 people found this helpful
          • 2. Re: How to: Read an XML file from a network drive?
            New Member

             

            Thanks for the quick reply. I've looked at the Event Wait event. It seems straight forward enough. How do I configure my session with the path information as you suggested?

             

             

            Thanks in advance!

             

             

            • 3. Re: How to: Read an XML file from a network drive?
              Guru

               

              When you edit the session, click on the Mappings tab; in the tree to the left, there are all sources; click the respective source, then to the right you will see the file properties. One of these properties is the Source File Directory which defaults to $PMSourceFileDir (usually $PMRootDir/SrcFiles); here you can enter any valid directory path accessible to your Integration Service. Then place the file name into the field Source File Name.

               

               

              Regards,

              Nico

               

               

              • 4. Re: How to: Read an XML file from a network drive?
                New Member

                 

                Nico,

                 

                 

                Thanks for the reply.  That's what I thought. I had that value set to point to a folder on my desktop, and realized that was probably not available to the integration service, since no host name was set. I guess I thought the client would see it. So if I have a UNC file map like  set, that should work, right?

                 

                 

                Also, for some reason, I changed the mapping and tried to re-run the workflow. The workflow doesn't show up in the workflow monitor, even though I have the option set "Launch Workflow Monitor when Workflow is started." from the options dialog.  Shouldn't the WF Monitor appear when I RMB on the workflow and select start workflow?

                 

                 

                Again, thanks for your help.

                 

                 

                Cheers~

                 

                 

                • 5. Re: How to: Read an XML file from a network drive?
                  New Member

                   

                  I got it working. Somehow the workflow was locked, as I checked in my session. I was not aware I was doing so. I recreated the workflow and set the values as described and got it working. Thanks for all of the helpful replies.

                   

                   

                   

                   

                   

                  • 6. Re: How to: Read an XML file from a network drive?
                    Suman Ghosh New Member

                    Hi ,

                     

                    IMPORT XML DEFINITION, We are using to read xml file and in target we have oracle to load the data.

                     

                    But one thing we have observed we cant fetch the filename during using import from xml definition, please help how to solve?

                    • 7. Re: How to: Read an XML file from a network drive?
                      David Lopez Cruz Guru

                      Hi Suman,

                      maybe it is because you have "Files of type" set to a specific type of files that you can't find any other file.

                      Try to set it to "All Files (*.*)" and let me know if that was the cause of your issue.

                       

                      Regards,

                      David

                      • 8. Re: How to: Read an XML file from a network drive?
                        Suman Ghosh New Member

                        I hope you didn't understand the requirement, we have to read 11 GB XML, so for that we are using informatica power center tool.when we are selecting under source as XML defination an dtrying to load to Oracle(target) then all data inside of xml is getting loaded, but there is no qualifier or anything by which we can store the file name!

                         

                        If you know the answer then please help me.

                        • 9. Re: How to: Read an XML file from a network drive?
                          Rajan Rath Guru

                          Hello Suman,

                           

                          Can you check the steps mentioned in the below document to see if that helps?

                          Adding a FileName Column

                           

                          Thanks,

                          Rajan