Skip to main content
All CollectionsProfit Genius
Connecting Seller Labs MySQL Connector to BigQuery
Connecting Seller Labs MySQL Connector to BigQuery
Denis avatar
Written by Denis
Updated this week

Integrating Seller Labs MySQL Connector with BigQuery enables you to centralize your eCommerce data for advanced analytics, reporting, and insights. Follow the steps below to establish a seamless connection between your MySQL database and BigQuery.


Prerequisites

  1. MySQL Database Access
    ​
    Ensure that you have access to your MySQL database hosted on Seller Labs. You will need the hostname, port, username, and password. These can be found on the Seller Labs Data Hub page. If you do not see them there, feel free to check these instructions on how to establish the connection
    ​

  2. Google BigQuery Setup

    • A Google Cloud project with BigQuery enabled.

    • Access credentials (JSON key file) for a service account with BigQuery Admin or appropriate roles.

  3. ETL Tool or Middleware (Optional)
    ​
    To automate data transfer, consider using an ETL tool or middleware platform (e.g., Estuary, Airbyte, or Fivetran).


Steps to Connect Seller Labs MySQL to BigQuery

1. Export Data from MySQL

Use Seller Labs MySQL connector to access your database. If you're exporting data manually:

  • Use a MySQL client (e.g., MySQL Workbench) or command-line tool.

  • Run SQL queries to export data tables into CSV or other BigQuery-compatible formats.

Example MySQL Command:

SELECT * INTO OUTFILE '/tmp/your_table.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM your_table;

2. Prepare BigQuery Environment

  • Log in to your Google Cloud Console.

  • Navigate to the BigQuery section.

  • Create a dataset in BigQuery where your MySQL data will be imported.

    • Example: project_id:dataset_name

3. Import Data into BigQuery (Manual Method)

If exporting data manually:

  • Use the BigQuery Web UI to upload the exported CSV files.

  • Map the schema during the import process to match the structure of your MySQL data.

Steps in BigQuery Web UI:

  • Click on "Create Table."

  • Select "Upload" and choose your exported file.

  • Specify the dataset and table name.

  • Define the schema or let BigQuery auto-detect it.

4. Automate with ETL Tools

For continuous synchronization between Seller Labs MySQL and BigQuery:

  • Use an ETL or data integration tool. Platforms like Estuary Flow, Fivetran, or Airbyte support direct MySQL to BigQuery pipelines.

  • Configure the MySQL source:

    • Provide hostname, port, username, password, and database name.

  • Configure the BigQuery destination:

    • Upload your service account key file to authenticate.

    • Specify the target dataset and table in BigQuery.

  • Start the pipeline and verify the data sync.

5. Verify Data in BigQuery

  • After data import or synchronization, query the data in BigQuery to ensure it matches your MySQL source.

Example BigQuery Query:

SELECT * FROM `project_id.dataset_name.table_name` LIMIT 100;

Benefits of This Integration

  • Centralized Analytics: Leverage BigQuery's powerful analytics to gain insights into your eCommerce data.

  • Scalability: BigQuery efficiently handles large datasets, allowing you to analyze years of Seller Labs data.

  • Automation: With ETL tools, your MySQL data can continuously sync to BigQuery, saving time and reducing errors.


By following these steps, you can effectively connect Seller Labs’ MySQL connector to BigQuery, enabling advanced reporting and data analysis to optimize your eCommerce operations.


Need help? Our support team is happy to assist you! πŸ™‚

  • Connect via the in-app chat icon, located in the bottom-right of your screen while logged into any of our apps

  • Search the Knowledge Base to see if your question has already been answered

  • Make an appointment with us for more direct support

*No Credit Card Needed

Did this answer your question?