title: BigCommerce sidebarTitle: BigCommerce
This documentation describes the integration of MindsDB with BigCommerce. The integration allows MindsDB to access data from BigCommerce and enhance it with AI capabilities.
Prerequisites
Before proceeding, ensure the following prerequisites are met:
- Install MindsDB locally via Docker or Docker Desktop.
Connection
Establish a connection to BigCommerce from MindsDB by executing the following SQL command and providing its handler name as an engine.
CREATE DATABASE bigcommerce_datasource
WITH
ENGINE = 'bigcommerce',
PARAMETERS = {
"api_base": "https://api.bigcommerce.com/stores/0fh0fh0fh0/v3/",
"access_token": "k9iexk9iexk9iexk9iexk9iexk9iexk"
};
Required connection parameters include the following:
api_base: The base URL of your BigCommerce store API (e.g.,https://api.bigcommerce.com/stores/YOUR_STORE_HASH/v3/).access_token: The API token for authenticating with your BigCommerce account.
Usage
Retrieve data from a specified table by providing the integration and table names:
SELECT *
FROM bigcommerce_datasource.orders
LIMIT 10;
The BigCommerce integration supports various tables including:
-- Available tables
SELECT * FROM bigcommerce_datasource.orders LIMIT 10;
SELECT * FROM bigcommerce_datasource.products LIMIT 10;
SELECT * FROM bigcommerce_datasource.customers LIMIT 10;
SELECT * FROM bigcommerce_datasource.categories LIMIT 10;
SELECT * FROM bigcommerce_datasource.pickups LIMIT 10;
SELECT * FROM bigcommerce_datasource.promotions LIMIT 10;
SELECT * FROM bigcommerce_datasource.wishlists LIMIT 10;
SELECT * FROM bigcommerce_datasource.segments LIMIT 10;
SELECT * FROM bigcommerce_datasource.brands LIMIT 10;
Query with filters and sorting:
-- Filter customers by name
SELECT * FROM bigcommerce_datasource.customers
WHERE name LIKE 'George'
ORDER BY last_name DESC;
-- Filter products by price and weight
SELECT * FROM bigcommerce_datasource.products
WHERE price = 109 AND weight = 1;
-- Search categories by name
SELECT * FROM bigcommerce_datasource.categories
WHERE name LIKE 'garden';