Connecting to your data with ODC file

Last updated About 1 month ago

In the article BI Book API Connection Methods we've discussed 2 ways of connecting to BI Book API and getting access to your data.

In this article we'll cover how you can establish OData connection even faster - by using ODC file.

What is ODC file

In short, ODC file format is a connection information file that contains properties to connect to, and retrieve data from an external data source or a Reporting Services Report.

When you download the ODC file from BI Book and open it with Excel, Power Query creates the OData connection automatically. All you have to do to access your data is to authenticate with one of the methods available.

Where to find it

Please navigate to Management page > API keys tab > press the button "Download ODC file" - the download will start automatically:

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdGNEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--3d1f0aff0b68cbe7646ee1695955bf6c7873c4cc/ODC.png

How to use it

  • Open the downloaded ODC file with MS Excel

  • You might receive a standard Microsoft Excel Security Notice outlining the following warning:

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdGdEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--12286335a52f9b0dc4d67a07453c0f63cfe0c427/ms%20warning.png
  • Please press "Enable" to proceed.

  • Next, you should authenticate using either "Basic" method or "Organizational account" method.

Basic authentication

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdGtEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e392b53cb8ff35f8ce68d8815d0daf380f83d4dd/basic.png

You can find user name and password for Basic auth from Management > API keys > API Admin Access:

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdG9EIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--116e0c589fd3d023822dbc1ac8722a65c8fa6a5b/basic.png

Just copy paste both user name and password and press "Connect".

Organizational account

Alternatively, if you are using your Microsoft organizational account with BI Book, you can connect to data using your organizational account.

  • !!! Prerequisite: please make sure that you have "Enable OData" toggle ON in your user settings

    • Management > Users > Edit user > "Enable OData access" (please remember to press "Save" if you change any of the settings):

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdHNEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--18ef300983cb4686427d1639d8de2193b1db4a52/edit%20user%20.png
  • Once "Enable OData access" toggle is ON for your user, you can then authenticate with your Organizational account > press "Sign in":

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdHdEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--34365fd79075167e938a2652282c256ca68ad724/org.png
  • After that you'll see Microsoft login window - if you have several Microsoft accounts, please choose the one you use with BI Book.

  • If authentication is successful > press "Connect":

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdDBEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ded3222d9ecf6c4cc9417e3ea01ca758029824da/connect.png

Navigating between data tables

Once authentication is completed successfully, you will see the list of tables available via OData connection.

  • To view a specific table click on "Query" tab in Excel:

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdDREIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--58b20bc72ee8c73ebaae8eb2dbb782a7b101d48c/query.png
  • Click on "Edit"

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdDhEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--d63c526e9747d6d993409066b2b55dd3a864f06a/edit.png
  • Power Query Editor will open.

  • Select a table you want to view > right click on the link in "Data" column > press "Add as a new query"

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdUFEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--6cc371cfc488be07f5d8c2b6fdb47204151653c3/new%20query.png
  • The table will be added as a new query

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdUVEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--05b3da0b34da054eba8fb5a1d88ded818eab7dd4/tables.png
  • In Power Query Editor you can apply different transformations to your data before loading it and using it in Excel. Please read more here: About Power Query in Excel - Microsoft Support

  • Once you are done with selecting / transforming your data tables, please press "Close & Load":

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdUlEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--39f143fef29760f21e15336044d0f047e005d7cf/load.png
  • All queries (tables) you've added in the Power Query Editor, will be added as separate sheets, which you can further use for your analysis or reporting:

/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdU1EIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--9950064f38b421ef39779e5b67ed1dfb9857b079/result.png