2 Replies Latest reply on Feb 20, 2020 7:50 AM by 3596198

    Externalization of Snapshot in RESTful service call

    3596198

      Hi, I am trying to externalize a WHERE clause in a snapshot and then pass the parameter via a restful service.

       

      Current Configuration:

      Setup Snapshot:

      1. Data Store is an oracle database connection
      2. Table Selection is 'Select Table or View'
      3. Column Selection all selected
      4. Filter Options - none at the moment.
      5. Sampling Options: All

      Job:

       

      Web Service Call:

      POST: http://<servername>:<port>/edq/jobs/run

       

      {

         "project":"Ross Development Project",

         "job":"Alias",

       

         "overrides":[

            {

               "name":"run_id",

               "value":"RUN_ID = 924"

            }

         ]

      }

       

      or

       

         "project":"Ross Development Project",

         "job":"Alias",

         "run_id":"RUN_ID = 924"

      }

       

      or

       

         "project":"Ross Development Project",

         "job":"Alias",

         "properties":[ 

            { 

               "name":"run_id",

               "value":"RUN_ID = 924"

            }

         ]

      }

       

      Result:

      • All rows are being returned (WHERE clause was not applied).

       

      Where am I going wrong? Assuming the Setup of the Snapshot?

       

      Thanks,

      Ross

       

       

      Message was edited by: 3596198 added additional request options tried

        • 1. Re: Externalization of Snapshot in RESTful service call
          Mike-Matthews-Oracle

          The first part you have done correctly - externalized the where clause.

           

          In the second part you are externalizing the enablement of the snapshot - you are not, here, externalizing the previous setting at another level, but the enablement of the snapshot in the job. You don't need to do this, and it also does not in any way act as an 'id'.

           

          You do not need to externalize the snapshot enablement, assuming you always want to the snapshot to run.

           

          Your externalization of the WHERE clause is fine though might be better to externalize this as 'where' rather than run_id.

           

          Your syntax of the REST call also looks wrong.

           

          You should untick the externalization of the snapshot itself, then use something like this to run the job:

           

          {"project":"projectname","job":"jobname","runlabel":"runlabelname","overrides":[{"name":"phase.*.snapshot.*.where","value":"whereclause"}]}

          • 2. Re: Externalization of Snapshot in RESTful service call
            3596198

            Got it working! Thanks for the explanation.