Import XML Data into the Power BI Service for Visualizations

Jerod Johnson
Jerod Johnson
Director, Technology Evangelism
Use CData Connect AI to connect to XML Data and provide access to live XML data for custom reports in the Power BI Service.

Power BI transforms your company's data into rich visuals for you to collect and organize so you can focus on what matters to you. When paired with CData Connect AI, you get access to XML data for visualizations, dashboards, and more. This article shows how to connect to XML in CData Connect AI, publish a dataset from Power BI Desktop to the Power BI Service and then create reports on XML data in the Power BI service.

Configure XML Connectivity for Power BI Service

Connectivity to XML from Power BI Service is made possible through CData Connect AI. To work with XML data from Power BI Service, we start by creating and configuring a XML connection.

  1. Log into Connect AI, click Sources, and then click Add Connection
  2. Select "XML" from the Add Connection panel
  3. Enter the necessary authentication properties to connect to XML.

    Connecting to Local or Cloud-Stored (Box, Google Drive, Amazon S3, SharePoint) XML Files

    CData Drivers let you work with XML files stored locally and stored in cloud storage services like Box, Amazon S3, Google Drive, or SharePoint, right where they are.

    Setting connection properties for local files

    Set the URI property to local folder path.

    Setting connection properties for files stored in Amazon S3

    To connect to XML file(s) within Amazon S3, set the URI property to the URI of the Bucket and Folder where the intended XML files exist. In addition, at least set these properties:

    • AWSAccessKey: AWS Access Key (username)
    • AWSSecretKey: AWS Secret Key

    Setting connection properties for files stored in Box

    To connect to XML file(s) within Box, set the URI property to the URI of the folder that includes the intended XML file(s). Use the OAuth authentication method to connect to Box.

    Dropbox

    To connect to XML file(s) within Dropbox, set the URI proprerty to the URI of the folder that includes the intended XML file(s). Use the OAuth authentication method to connect to Dropbox. Either User Account or Service Account can be used to authenticate.

    SharePoint Online (SOAP)

    To connect to XML file(s) within SharePoint with SOAP Schema, set the URI proprerty to the URI of the document library that includes the intended XML file. Set User, Password, and StorageBaseURL.

    SharePoint Online REST

    To connect to XML file(s) within SharePoint with REST Schema, set the URI proprerty to the URI of the document library that includes the intended XML file. StorageBaseURL is optional. If not set, the driver will use the root drive. OAuth is used to authenticate.

    Google Drive

    To connect to XML file(s) within Google Drive, set the URI property to the URI of the folder that includes the intended XML file(s). Use the OAuth authentication method to connect and set InitiateOAuth to GETANDREFRESH.

    The DataModel property is the controlling property over how your data is represented into tables and toggles the following basic configurations.

    • Document (default): Model a top-level, document view of your XML data. The data provider returns nested elements as aggregates of data.
    • FlattenedDocuments: Implicitly join nested documents and their parents into a single table.
    • Relational: Return individual, related tables from hierarchical data. The tables contain a primary key and a foreign key that links to the parent document.

    See the Modeling XML Data chapter for more information on configuring the relational representation. You will also find the sample data used in the following examples. The data includes entries for people, the cars they own, and various maintenance services performed on those cars.

  4. Click Save & Test
  5. Navigate to the Permissions tab in the Add XML Connection page and update the User-based permissions.

With the connection configured, you are ready to connect to XML data from the Power BI service.

Publish a Dataset from Power BI Desktop

Once you connect to XML in Connect AI, you can create a dataset in Power BI desktop and publish the dataset to the Power BI service.

  1. Open Power BI Desktop and click Get Data -> Online Services -> CData Connect AI and click "Connect"
  2. Click "Sign in" and authenticate with your CData Connect AI account
  3. After signing in, click "Connect"
  4. Select tables in the Navigator dialog
  5. Click Load to establish the connection to your XML data from Power BI

  6. Define any relationships between the selected entities on the Relationships tab.
  7. Click Publish (from the Home menu) and select a Workspace.

Build Reports and Dashboards on XML Data in the Power BI Service

Now that you have published a dataset to the Power BI service, you can create new reports and dashboards based on the published data:

  1. Log in to PowerBI.com.
  2. Click Workspaces and select a workspace.
  3. Click Create and select Report.
  4. Select the published dataset for the report.
  5. Choose fields and visualizations to add to your report.

Live Access to XML Data from Cloud Applications

Now you have a direct connection to live XML data from the Power BI service. You can create more data sources and new visualizations, build reports, and more — all without replicating XML data.

To get live data access to 300+ SaaS, Big Data, and NoSQL sources directly from your cloud applications, sign up for a free trial of CData Connect AI.

Ready to get started?

Learn more about CData Connect AI or sign up for free trial access:

Free Trial