Skip navigation
Contact Us
18184 Views 18 Replies Latest reply: May 14, 2014 12:56 AM by Anup Borkar RSS
Ali Syed Novice 35 posts since
May 2, 2010
Currently Being Moderated

Aug 30, 2011 9:55 AM

scripts to invoke informatica cloud task

Hi there,

 

Does any one have a sample scripts (bat files) that can invoke IC task. I have a stored proc ( SQL Server) that updates a table and after its completion, I want to kick off my IC task .We dont have an external scheduler and we use the SQL Agent for our Job Scheduling.

Any Advise is appreciated

 

Thanks

Ali

  • Paul King Novice 14 posts since
    Sep 27, 2011
    Currently Being Moderated
    Nov 8, 2011 12:28 PM (in response to Ali Syed)
    scripts to invoke informatica cloud task

    I'm also looking for the syntax I could place in a .bat file to call an IC Data Service.  Please Reply back if you have encountered anything.

     

    In the meantime, a less-than-ideal alternative for your scenario might be:

    - Schedule your IC Task to start before (e.g. 30-60 minutes) you expect the stored proc to complete.

    - Follow the steps in ( https://community.informatica.com/docs/DOC-1718 ) to create a Preprocessing Command to wait for a success file from the stored proc.

    - When the stored proc completes, place a file in the "filewait" directory (explained in the link)

      • Sonal Gupta Newbie 9 posts since
        Sep 5, 2011
        Currently Being Moderated
        Nov 14, 2011 2:01 AM (in response to Ali Syed)
        scripts to invoke informatica cloud task

        have you got the code for script to call REST api of informatica,

        Please share

      • Paul King Novice 14 posts since
        Sep 27, 2011
        Currently Being Moderated
        Nov 14, 2011 7:54 AM (in response to Ali Syed)
        scripts to invoke informatica cloud task

        Here are the steps I took:

         

        1) Download cURL (open source command line tool for transferring data with URL syntax) from curl.haxx.se

        2) Extract all contents of 'curl-7.22.0-ssl-sspi-zlib-static-bin-w32.zip' to a directory, e.g. C:\REST

        -- Ensure curl.exe and all other files appear in this directory after extract

        3) Create a file named rest.bat in the same C:\REST directory

        4) In the rest.bat file, place the command syntax below.  These will do the following:

        -- Call curl.exe

        -- (Optional) Set a proxy for you, e.g. if you are behind a corporate firewall:

        -- Log in to Informatica Cloud, and write login response to C:\REST directory

        -- Log in to Informatica Cloud, call a Task, and write task response to C:\REST directory

        -- *Note that I was calling the task "Replicate Territory IDs" that has spaces in the name, so I added the "+" character for encoding.  Also, this was a Data Replication task, so I set jobType to DRS.  Data Synchronization Tasks would use DSS, etc.

        -----------------------------------------------

        curl.exe

        Set HTTPS_PROXY=webproxy.company.com:8080

        curl -H "Accept: application/xml" -H "Content-Type: application/xml" -k -X POST -o C:\REST\LoginResponse.xml "https://app.informaticaondemand.com/saas/api/1/login?username=<username>&password=<password>&responseType=xml"

        Set HTTPS_PROXY=webproxy.company.com:8080

        curl -H "Accept: application/xml" -H "Content-Type: application/xml" -k -X POST -o C:\REST\RunJobResponse.xml "https://app.informaticaondemand.com/saas/api/1/runjob?username=<username>&password=<password>&jobName=Replicate+Territory+IDs&jobType=DRS&responseType=xml"

        pause

        -----------------------------------------------

         

        That's it.  Attached is a screen grab of the response .xmls I received from both commands

        Responses.png

        • Paul King Novice 14 posts since
          Sep 27, 2011
          Currently Being Moderated
          Nov 14, 2011 10:37 AM (in response to Paul King)
          scripts to invoke informatica cloud task

          Here are the different parameters for "jobType"

          • DLS = Data Loader
          • DRS = Data Replication
          • DSS = Data Synchronization
          • DQA = Data Assessment
          • PCS = PowerCenter
          • Workflow = Task Flow
        • Bryan Plaster InfaEmp 64 posts since
          Jul 26, 2010
          Currently Being Moderated
          Jan 26, 2012 5:57 PM (in response to Paul King)
          scripts to invoke informatica cloud task

          loving this little tidbit!   

        • babu tiru Newbie 9 posts since
          Jun 10, 2013
          Currently Being Moderated
          Feb 10, 2014 3:27 AM (in response to Paul King)
          scripts to invoke informatica cloud task

          Hi There,

           

          I am  not able to  find the below file.

          'curl-7.22.0-ssl-sspi-zlib-static-bin-w32.zip'

           

          It wiould be appreciated could u please give the correct URL(link).

           

          Thanks,

          Babu

        • Anup Borkar Newbie 4 posts since
          May 13, 2014
          Currently Being Moderated
          May 14, 2014 12:56 AM (in response to Paul King)
          Re: scripts to invoke informatica cloud task

          Hey Paul,

           

          Thanks for sharing this. I am facing few problems with this. Was worndering if you could help me.

          I tried this with both the api versions (1 and v2). I am getting different error for each of the version. Below is the script and respective error msg:

           

          Version 1:

          Script:

          curl.exe
          curl -H Accept: application/xml -H Content-Type: application/xml -k -X POST -o C:\REST\LoginResponse.xml "https://app.informaticaondemand.com/saas/api/1/login?username=anup.borkar@accenture.com&password=xxxx&responseType=xml
          pause
          
          

           

          Response:

           

          <?xml version="1.0" encoding="utf-8"?>
          <LoginResponse>
            <errorCode>LOGIN_INVALID_USERNAME</errorCode>
            <errorMsg>Login Failed. Incorrect username/password specified.</errorMsg>
            <sessionId></sessionId>
          </LoginResponse>
          
          

           

           

          Version 2:

          Script:

           

          curl.exe
          curl -H Accept: application/xml -H Content-Type: application/xml -k -X POST -o C:\REST\LoginResponse.xml "
          https://app.informaticaondemand.com/ma/api/v2/user/login?username=anup.borkar@accenture.com&password=xxxx&responseType=xml
          pause
          
          
          

           

          Response:

           

          </style> </head><body><h1>HTTP Status 400 - </h1><HR size="1" noshade="noshade"><p><b>type
          </b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> 
          
          <u>The request sent by the client was syntactically incorrect.</u>
          
          </p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.47</h3></body></html>
          
          

           

          Am I missing out on anything here? I checked my license and I do have REST rights.

           

          Just to check if everything is in place I tried the solution give at

          https://community.informatica.com/thread/41240

          And it worked for me.

           

          Would appreciate your help.

           

          Regards!

  • Bryan Plaster InfaEmp 64 posts since
    Jul 26, 2010
    Currently Being Moderated
    Jan 26, 2012 5:56 PM (in response to Ali Syed)
    scripts to invoke informatica cloud task

    this article is how to run a stored procedure from the command line and kick it off from a pre or post processor

    https://community.informatica.com/docs/DOC-1680

  • Shovan Nath Newbie 4 posts since
    Nov 1, 2012
    Currently Being Moderated
    Nov 1, 2012 9:08 AM (in response to Ali Syed)
    scripts to invoke informatica cloud task

    I have wrtten a perl script to use the response and monitor the whole step from execution to end.

    • Elias Sha Expert 184 posts since
      Jun 3, 2009
      Currently Being Moderated
      Nov 5, 2012 7:49 PM (in response to Shovan Nath)
      scripts to invoke informatica cloud task

      Hi Shovan,

       

      It whould be nice if you can share the perl script with the community.  Here is something we recently developed that may help this discussion at large.

       

      https://community.informatica.com/docs/DOC-2908

      • Shovan Nath Newbie 4 posts since
        Nov 1, 2012
        Currently Being Moderated
        Nov 13, 2012 1:02 PM (in response to Elias Sha)
        scripts to invoke informatica cloud task

        Hi Elias,

        I wont be able to share the script becoz it comes under client data protection policy of my company, but surely will share then concept.

        Just to give an insight of what we were looking for and what we did.

        We were looking for a replacement for Pmcmd commnd.

        we used perl, firefox extensively to login to infa and chk the status of a task.

        If it is in running it would be in Actiity monitor.If not it will be in actiity log.

        This script is environmnt independant, as can bused both in linux d windows. It takethe final snapshot of the final page so its a comprehensive way of doing it.

  • A K Novice 27 posts since
    Nov 9, 2010
    Currently Being Moderated
    Apr 17, 2013 9:39 PM (in response to Ali Syed)
    scripts to invoke informatica cloud task

    I am unable to invoke the Cloud Task as our organisation has PROXY.below is the error.

    Has anyone faced this?

     

    curl: (56) Received HTTP code 407 from proxy after CONNECT

  • A K Novice 27 posts since
    Nov 9, 2010
    Currently Being Moderated
    Apr 17, 2013 10:28 PM (in response to Ali Syed)
    Re: scripts to invoke informatica cloud task

    I am unable to invoke the Cloud Task as our organisation has PROXY.below is the error.

    Has anyone faced this?

     

    curl: (56) Received HTTP code 407 from proxy after CONNECT

  • Subro Don Newbie 11 posts since
    Dec 27, 2013
    Currently Being Moderated
    Feb 3, 2014 4:22 AM (in response to Ali Syed)
    scripts to invoke informatica cloud task

    Hey People.

    I need a small help. I noticed that curl was present within /tools/ folder where my informatica agent has been stored. So do i need to download the above mentioned package. Also i am running on Linux Environment. How do i configure this for Linux? please help. Also i am not having any proxy set up.

     

    Please help!

More Like This

  • Retrieving data ...

Bookmarked By (1)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points