Integrating the CData JDBC Driver for WooCommerce with Ignition SCADA
Ignition is an industrial supervisory control and data acquisition (SCADA) and industrial Internet of Things (IIoT) platform from Inductive Automation. Its central Gateway service manages device connections, tags, and database connections. Ignition doesn't ship with a connector for WooCommerce, so reaching WooCommerce data usually means custom middleware or manual exports.
The CData JDBC Driver for WooCommerce bridges this gap by exposing WooCommerce as a standard Java Database Connectivity (JDBC) data source. Ignition treats any JDBC driver as a standard database connection. Once the driver is registered in the Gateway, you can query live WooCommerce data from the Script Console, SQL Bridge, tags, or a Perspective or Vision screen, without replication, custom connectors, or extract, transform, load (ETL) pipelines.
This guide outlines the steps to install and commission Ignition, register the CData JDBC Driver for WooCommerce, create the connection, and verify it with a live query.
Prerequisites
- Ignition for Windows (Windows 10/11 or Windows Server), with administrator rights to install a Windows service
- CData JDBC Driver for WooCommerce
- A WooCommerce account with valid credentials and application programming interface (API) access enabled
- A supported desktop browser (Google Chrome, Mozilla Firefox, Microsoft Edge, or Safari) to open the Gateway web interface
Step 1: Install and set up Ignition
If Ignition is already installed and running, skip to Step 2.
Download Ignition
-
Go to the Inductive Automation downloads page and download Ignition for Windows.
- This single download is the full Ignition Gateway installer. It includes both the Gateway service and the Designer Launcher, so you don't need a separate Designer download.
Install Ignition
- Run the installer, accept the license agreement, and choose an install location.
- Leave Install as a Windows Service checked so the Gateway starts with Windows.
- Finish the installer. The Gateway service starts, and a browser window opens to http://localhost:8088 and shows the Commissioning wizard. If the page shows a Browser Not Supported notice, open the same address in Chrome, Firefox, Edge, or Safari.
Commission the Gateway
- In the Commission Ignition Gateway wizard, set a Gateway Name and create an administrator username and password.
- Accept the End User License Agreement, then start a trial or activate a purchased Ignition license.
-
When commissioning finishes, log in with the administrator account. You land on the Gateway Home page.
Note: A trial shows a countdown timer on every Gateway page, and the timer resets when the Gateway service restarts. This is fine for testing, but production use requires a license.
Step 2: Register the CData JDBC Driver in Ignition
Ignition lets you upload any third-party JDBC driver through the Gateway web interface, without touching the file system directly.
- Log in to the Gateway as an administrator.
- Go to Connections > Databases > Settings, open the Drivers tab, and click Create JDBC Driver.
-
In the dialog, enter the following:
- Name: WooCommerce
- Classname: cdata.jdbc.woocommerce.WooCommerceDriver
- Driver Type: Generic
- Default Validation Query: SELECT ParentId FROM Orders LIMIT 1
- Click Create JDBC Driver. In current Ignition 8.3 releases, the create dialog doesn't include a Java archive (JAR) file upload field, so you add the JAR file in the next step.
- Open the menu at the right of the new driver row, choose Manage JAR files, upload cdata.jdbc.woocommerce.jar from the lib folder of the driver installation, and save.
-
Confirm the driver shows an INSTALLED status in the drivers list.
Step 3: Create the WooCommerce connection
- Go to Connections > Databases > Connections and click Create Database Connection.
-
On the Driver Selection step, select WooCommerce and click Next.
- On the Database Setup step, set the Name to WooCommerce. Leave Username empty and select None for Password, because the credentials go in the connect URL.
-
In Connect URL, enter the connection string:
jdbc:woocommerce:Url=https://example.com/; ConsumerKey=ck_ec52c76185c088ecaa3145287c8acba55a6f59ad; ConsumerSecret=cs_9fde14bf57126156701a7563fc87575713c355e5;InitiateOAuth=GETANDREFRESH;
-
Click Create Database Connection and confirm the connection shows a VALID status on the Database Connections page.
Connection properties for WooCommerce
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, set the Url property to the URL of the WooCommerce instance.
Note: If a password or token contains a semicolon, the connect URL breaks, so reset it to a value without one.
With the connection valid, you can query live WooCommerce data from the Designer.
Note: The connection name in the script must match the name you gave the connection in Step 3.
To confirm the driver works independently of the Gateway, run this standalone Java example. The cdata.jdbc.woocommerce.jar and cdata.jdbc.woocommerce.lic files must be in the same directory and on the classpath.
With the CData JDBC Driver for WooCommerce registered, your team can query live WooCommerce data from Ignition without ETL infrastructure, manual exports, or custom integration code, and reuse the same connection in tags, SQL Bridge, and Perspective or Vision screens.
Start your free trial today to see how you can give Ignition live, secure access to hundreds of external systems with CData.
Step 4: Query live WooCommerce data from Ignition
print system.db.runQuery(
"SELECT ParentId, Total FROM Orders LIMIT 10",
"WooCommerce")
Step 5: Verify the results
ds = system.db.runQuery("SELECT ParentId, Total FROM Orders LIMIT 10", "WooCommerce")
for row in ds:
print row["ParentId"], row["Total"]Troubleshooting
Symptom
Likely cause and fix
Driver status shows ERROR The classname is wrong, or the JAR file hasn't been uploaded through Manage JAR files. Connection status shows FAULTED The credentials are wrong, outbound web traffic (HTTPS) is blocked, or the CData license isn't found. Click the status to read the error. Error: Could not find a valid license The Gateway runs as a Windows service and can't read a license stored in your user profile. In an administrator command prompt, run java -jar cdata.jdbc.woocommerce.jar --license from the driver's lib folder, copy the generated .lic file to C:\Windows\system32\config\systemprofile\.CData\, and restart the Gateway service. Database connection not found The connection name in the script doesn't match the Gateway connection name exactly. Test the driver outside Ignition
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class CDataExample {
public static void main(String[] args) throws Exception {
Class.forName("cdata.jdbc.woocommerce.WooCommerceDriver");
String connectionString = "jdbc:woocommerce:Url=https://example.com/; ConsumerKey=ck_ec52c76185c088ecaa3145287c8acba55a6f59ad; ConsumerSecret=cs_9fde14bf57126156701a7563fc87575713c355e5;InitiateOAuth=GETANDREFRESH;";
try (Connection conn = DriverManager.getConnection(connectionString)) {
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT ParentId, Total FROM Orders LIMIT 10");
while (rs.next()) {
System.out.println(rs.getString("ParentId") + ", " + rs.getString("Total"));
}
}
}
}
Build live, governed WooCommerce connectivity in Ignition with CData