How to access Spotfire Data Virtualization ODATA URL from Excel Power Query using basic authentication?

book

Article ID: KB0137914

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All supported versions

Description

This article provides the steps that are required to access Spotfire Data Virtualization(SDV) ODATA URL from Excel Power Query using basic authentication. 

Environment

All supported Operating Systems

Resolution

Steps to follow -  

(1) Prepare the OData Service URL

For the DV-published OData URL that you wish to access, Copy the 'Service URL' (double-click on the URL to copy it).

Example Service URL: http://[Hostname]:9900/odata/test/

image.png

Note: If you encounter an error such as *"Unsupported: No primary key defined. Please define a primary key to access this view via OData"*, verify that the underlying resource has a primary key defined. Follow the standard procedure in DV to define a primary key, if needed.

(3) Using Basic Authentication in Excel Power Query

* Open Excel.
* Navigate to: `Data` tab > `Get Data` > `Launch Power Query Editor`.
* Go to: `New Source` > `Other Sources` > `Blank Query`.
* Open 'Advanced Editor' and paste the following code (update the `url` accordingly):

let
    Source = OData.Feed("http://muepvdipd2129.tibco.com:4070/odata/Inventory/categories", null, [Implementation="2.0"])
in
    Source

Screenshot for reference -

 image.png

(4) Excel will show a pop-up to authenticate the user as shown below : 

image.png

(5) Now click on 'Edit Credentials' and use the basic tab and enter the username as username@domain and the password and click 'Connect' : 

image.png

(6) The OData URL will be executed returning the results :  

image.png

You can now continue working with and transforming the data using Power Query as needed.

Issue/Introduction

How to access Spotfire Data Virtualization ODATA URL from Excel Power Query using basic authentication?