Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
antara_centri
Frequent Visitor

Hello All,I am trying to integrate ServiceNow with Power BI

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.

 

 

5 REPLIES 5
dariadolinko
Helper III
Helper III

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 .

jennratten
Super User
Super User

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.

v-cgao-msft
Community Support
Community Support

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

Joe_Barry
Super User
Super User

Hi @antara_centri 

 

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




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors