Skip to main content

Hi All

 

 

We have created a custom REST API to pull data into Celonis. This is working well for full data extractions.

 

How do we create and use a variable within the API rest query to enable delta extract?

 

ie. We want a way to replace the text in {{}} with the last date within the datamodel:

 http://xxx.service-now.com/api/now/table/sys_audit?sysparm_display_value=true&sysparm_query=tablename=interaction^sys_created_on>javascript:gs.dateGenerate({{MAX DATE FROM MODEL}}','00:00:00')^ORDERBYsys_created_on&sysparm_offset=0&sysparm_limit=1000

 

thanks

David

Hi David,

 

Not sure if this is what you were imagining, but if you are running these Delta extractions on a typical daily basis, then that Max Date should mathematically always be yesterday (or today, depending on time cut-offs).

Then of course if some jobs fail, you might have to automate their re-trigger so that you don't get data gaps for days where it failed.

 

Best,


Thanks Stephane,

 

Unfortunately that approach won't work, as we can't pass a standalone parameter. It needs to be embedded into a query string parameter, with the max-date variable surrounded by static text.

 

So in this case the API query string parameter name is: sysparm_query. The variable part is broken into 3 sections:

 

1st: tablename=interaction^sys_created_on>javascript:gs.dateGenerate('

2nd: MAX_DATE

3rd: ','00:00:00')^ORDERBYsys_created_on

 

The problem is I can't find a way to build this string and pass it to the extraction routine.

 

thanks

David


Reply