This guide will tell you how to export data to your database(MySQL, SQLServer) automatically and introduce Octoparse's auto-export tool (Database only).
Here are the prerequisites before we start:
- A task with Cloud data results (Auto-export to database is for Cloud data only)
- A table with data fields configured in your database to receive data
The feature of "Auto-export to database" only supports MySql and SqlServer. If you need to connect with other databases or platforms (such as your own websites), please refer to Octoparse API: Data Export API and Advanced API
1. How to connect to your database
This tutorial will use the MySql database as an example.
View the Cloud data of the target task.
- Click the "Export Data" button
- Choose the type of your database
- Press "OK"
- Fill up the required fields about the target database settings.
After filling up the information, click "Test Connection" to see if you can connect to your database.
If the setting is alright, you will receive a "Connected" notice as above. Then, you can click "Next" to move forward.
Now, we need to configure data mappings.
- Select an existing table from the Data Table drop-down options
- Match the source data fields (data fields extracted) to the target data fields from the designated table
- Select any source data fields to use as identifier (primary key)
- Enter the name of the schedule into the text box next to "Scheduled Export"
- Select at what time interval you would like to export the data to the database, ie. the export is scheduled to run every 1 hour in the screenshot.
- Click "Next"
- After set-up is completed, press the "Completed" button to exit.
Once a data field is selected as a primary key, subsequent data records with the same primary key will overwrite the existing ones in the database.
Once the configuration is completed, it can be saved for later use. You can name the setting first and then press the "Save" button to save it.
Next time, if you want to use your previous database export settings, you can just choose a saved setting to save time.
2. Introduction to database auto-export tool
After you set up the database settings, the Auto-export tool will pop up simultaneously. It will show you all the configuration details about auto-export to database.
From the pop-up window, you can start/stop/delete the scheduled auto export to the database. Also, you can check the error report.
Please note that you have to keep the database auto-export tool open to keep exporting data. That means you cannot turn off your computer during the export. Otherwise, your task export will be stopped.
1. The auto-export tool is also accessible from "Tool box" from the side navigation.
2. The export will start immediately when you click the Start button.
3. Automatic export to database only exports unexported data every time.