We are proud to share our inclusion in the 2024 Gartner Magic Quadrant for Data Integration Tools. We believe this recognition reflects the differentiated business outcomes CData delivers to our customers.
Get the Report →How to Connect the Power BI Service to WooCommerce: Complete Guide
Connect to the CData Power BI Connectors from PowerBI.com to provide real-time datasets across the organization.
The CData Power BI Connector for WooCommerce seamlessly integrates with the tools and wizards in Power BI, including the real-time data workflows on PowerBI.com. Follow the steps below to publish reports to PowerBI.com and use the Power BI Gateway to configure automatic refresh.
1. Create a DSN
Installing the Power BI Connector creates a DSN (data source name) called CData Power BI WooCommerce. This the name of the DSN that Power BI uses to request a connection to the data source. Configure the DSN by filling in the required connection properties.
You can use the Microsoft ODBC Data Source Administrator to create a new DSN or configure (and rename) an existing DSN: From the Start menu, enter "ODBC Data Sources." Ensure that you run the version of the ODBC Administrator that corresponds to the bitness of your Power BI Desktop installation (32-bit or 64-bit).
WooCommerce supports the following authentication methods: one-legged OAuth1.0 Authentication and standard OAuth2.0 Authentication.
Connecting using one-legged OAuth 1.0 Authentication
Specify the following properties (NOTE: the below credentials are generated from WooCommerce settings page and should not be confused with the credentials generated by using WordPress OAuth2.0 plugin):
- ConsumerKey
- ConsumerSecret
Connecting using WordPress OAuth 2.0 Authentication
After having configured the plugin, you may connect to WooCommerce by providing the following connection properties:
In either case, you will need to set the Url property to the URL of the WooCommerce instance.
With the data source configured, follow the steps below to load data from WooCommerce tables into a dataset.
Use the Query Editor if you need more control over the query and query results before you load the data. Power BI detects the column behavior from the WooCommerce metadata retrieved by the CData connector. In the Query Editor, you can perform actions like filtering, summarizing, and sorting on columns.
To open the Query Editor, click Edit in the Navigator window. Right-click a row to filter the rows. Right-click a column header to perform actions like the following:
Power BI records your query modifications in the Applied Steps section, adjusting the underlying data retrieval query that is executed to the remote WooCommerce data.
When you click Load, the connector executes the underlying query to WooCommerce.
After loading WooCommerce data into Power BI, you can create data visualizations in the Report view by dragging fields from the Fields pane onto the canvas. Follow the steps below to create a pie chart:
You can change sort options by clicking the ellipsis (...) button for the chart. Options to select the sort column and change the sort order are displayed.
You can use both highlighting and filtering to focus on data. Filtering removes unfocused data from visualizations; highlighting dims unfocused data.
You can highlight fields by clicking them:
You can apply filters at the page level, at the report level, or to a single visualization by dragging fields onto the Filters pane. To filter on the field value, select one of the values that are displayed in the Filters pane.
Click Refresh to synchronize your report with any changes to the data.
Follow the steps below to configure automatic data refresh through the Power BI Gateway. The gateway enables the Power BI cloud service to connect to the DSN on your machine.
You need to select a gateway mode when you install the gateway:
Publishing through the gateway in personal mode simply requires an installed gateway with access to custom connectors. Publishing through the gateway requires an installed gateway with access to customer connectors and a configured connection to the DSN for WooCommerce from PowerBI.com
Follow the steps below to configure the gateway on your machine:
In the Connectors step, choose a folder where the gateway will look for the CData Power BI Connector. This article uses C:\Users\PBIEgwService\Documents\Power BI Desktop\Custom Connectors\. Copy the .pqx files for the CData Connector (found in C:\Users\USERNAME\Documents\Power BI Desktop\Custom Connectors\) to the folder you configured.
NOTE: The account configured for the service (NT SERVICE\PBIEgwService) needs to be able to access the folder chosen for the gateway. If needed, you can change the service account in the Service Settings section of the gateway installer.
You can now publish refreshable reports and their underlying datasets. Follow the steps below to publish and complete the data refresh configuration for a dataset.
2. Get WooCommerce Data
Select Tables and Views to Load
Shaping Data
Load Data
3. Create Data Visualizations
4. Configure Data Refresh on PowerBI.com
Selecting a Gateway Mode
You need a system DSN to connect through the default gateway. (System DSNs can be accessed system-wide, while user DSNs can only be used by a specific user account.) You can use the CData Power BI WooCommerce system DSN configured as the last step of the connector installation.
Configuring the Gateway (Personal Mode)
Note: The CData Power BI Connectors install the .pqx files to the default folder, Your User Home\Documents\Power BI Desktop\Custom Connectors.
Configuring the Gateway (Standard Mode)
1. Set Up the Gateway
2. Connect to WooCommerce Data from PowerBI.com
5. Publish to PowerBI.com
- In Power BI Desktop, click Publish on the Home ribbon to publish the report.
- On PowerBI.com, select the workspace where you uploaded the report.
- In the Datasets section, click the options menu for the WooCommerce dataset you created, then click Settings.
- In the Gateway Connection section, enable the option to use a gateway and select your gateway. You may need to manually add the data source to the gateway:
- Expand the Gateway under the Actions column
- Click the link to "Manually add to gateway"
- In the "New connection" form, set the Connection name, set Data Source Name to the same data source name as above (e.g. "CData PBI WooCommerce"), and set Authentication Method to "Anonymous"
- Set Privacy Level as needed and click "Create"
- If you are using the gateway in personal mode, expand the Data Source Credentials node and click Edit Credentials -> Sign In. (This step is not necessary if you are using the default gateway.)
6. Refresh a Dataset
Refresh the dataset to provide the current data to your reports.
- To refresh manually, open the dataset options menu from your workspace -> Datasets and click Refresh Now.
- To schedule refreshes, open the dataset options menu from your workspace -> Datasets and click Schedule Refresh. Enable the option to keep your data up to date. Specify the refresh frequency in the menus.
- In Report view, click Refresh to sync the report with the dataset as you work.