The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I am trying to integrate ServiceNow with Power BI.
I have created a database view in ServiceNow and using the REST API EXPLORER created the API calls.so far I have around 200000 records in the database view so my API calls are as below.
On first attempt URL1: /api/now/table/incident?sysparm_limit=10000&sysparm_offset=0
Next with URL2: /api/now/table/incident?sysparm_limit=10000&sysparm_offset=10000
URL3: /api/now/table/incident?sysparm_limit=10000&sysparm_offset=20000
....
...
...
URL200: /api/now/table/incident?sysparm_limit=10000&sysparm_offset=200000
Then I have to get the newer data in in power BI as well.I am trying to understand what will be the best way to achieve this.
Hello @antara_centri,
You might want to try an alternative solution? We've built an app for Servicenow and Power BI integration: Power BI Connector for Servicenow. It's easy to use, it's fast and automated.
If you need any assistance feel free to reach us anytime at support@alpha-serve.com .
I agree with @Joe_Barry and am confirming that I connect to ServiceNow data in Power BI via SQL.
Hello @jennjenn can you kindly elaborate on how you are using it now.I am a newbie and finding it difficult.I tried looking up but could not find much to connect via sql.
Hi @antara_centri ,
Roughly the process can be to first generate a list of the API, then use a custom function to call the API, and then according to the results returned, for example, if the number of records exceeded the part of the return error you can use try...otherwise...to catch the error, or filter <>null if it returns null if it exceeds the number of records, and finally combine the expanded data.
This is a reference code:
let
GetData = () =>
let
TotalRecords = 200000, // Adjust based on your actual record count
PageSize = 10000,
PageCount = Number.RoundUp(TotalRecords / PageSize) + 1,
Source = List.Generate(
() => 0,
each _ < PageCount,
each _ + PageSize,
each
let
Offset = _ * PageSize,
URL = "https://baseurl/api/now/table/incident?sysparm_limit=" & Text.From(PageSize) & "&sysparm_offset=" & Text.From(Offset),
Data = try CustomFuntiontoCallAPI(URL) otherwise null
in
Data
),
FilteredSource = List.Select(Source, each _ <> null),
CombinedData = Table.Combine(FilteredSource)
in
CombinedData
in
GetData
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
It's been a few years since I worked on ServiceNow, but if memory serves me well, the database is built on a SQL DB, so you can connect directly to the database using the SQL Server Connector. If you have all the Server and DB information, then you should be able to connect. https://www.servicenow.com/community/developer-forum/what-type-of-database-does-servicenow-use/m-p/2...
Joe
Proud to be a Super User! | |
Date tables help! Learn more
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.