Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Data through REST API into power bi

Raks
Tera Contributor

Team,

Need help, I am trying to get Servicenow data into power bi using table API. I am somewhat successful but came to a roadblock as I can only able to extract 4000 records in a single query. Although I have read that there is a default limit of 10000 records a query can fetch.

My idea is to get the 10000 records in power bi using query and then I will use incremental refresh to update the data in my data model.

Any help is highly appreciated.

 

8 REPLIES 8

Ankur Bawiskar
Tera Patron

Hi,

the approach looks good; I am not sure why you got only 4000 records. Did you check whether the limit in the GET API call was set to 4000

Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

I tried running the query with defaults i.e. without any parameter to limit the number of records to reterive but this approach return a failure in the query.

The query runs sucessfully when I set the limit to 4000.

thanks

Hi,

So are you saying it always return 4000 records even though you have not given any limit?

I think if you don't give sysparm_limit then it automatically takes it as 10000 and returns only that; you can try giving sysparm_limit as 15000 or 18000 and check the count

Regards

Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi,

I ran query the following query 

 https://xxx.service-now.com/api/now/table/task?sysparm_display_value=true&sysparm_exclude_reference_link=true

So ideally this should return 10000 records but it is giving me a failure, so I tried this query

 https://xxx.service-now.com/api/now/table/task?sysparm_display_value=true&sysparm_exclude_reference_link=true&sysparm_limit=10000

now I receive this error