Connect to MySQL Data#
You can stream data from a MySQL data source to Apperate.
Let’s set up a connection to MySQL.
Connecting to MySQL#
In the Console, open the Connect a Data Source form by clicking on the plus (
+
) sign next to DATA SOURCES in the navigation or by clicking Create Source in the Data Sources page. The Connect a Data Source form appears.Expand the Data Source menu and select MySQL.
Then click Next. The MySQL connection fields appear.
Specify your MySQL connection by filling in the following fields.
Source ID: A name for the data source.
Dataset ID: (case-sensitive) Name of a dataset (new or existing) to populate with the streaming data.
Description: Describe your source.
Host: MySQL server host.
Port: MySQL server port.
User: MySQL username.
Password: MySQL password.
Here’s an example configuration:
Use the Synchronous checkbox to indicate whether you want data written in asynchronously (default) or synchronously.
Asynchronous (default): This is the fastest way to stream data. Apperate saves the data, queues it, and shortly therafter makes it available to query.
Synchronous: With each write to Apperate, Apperate blocks until the data write is confirmed and is available to query.
Click Create Connector, when you’re done configuring the connector. Apperate returns you to the Data Sources page and a message indicates that your connector is created.
Note
The data source’s status is PENDING until the connector has received the list of available streams from the data source.
Click on the data source to open its details. When the source’s status is RECEIVED, the Streams menu appears.
Select a stream (e.g., a table name).
The source status is READY and the Submit Stream button is enabled.
Click Submit Stream to complete your connector configuration. A Start Connector button appears.
Starting Your Connector#
You can start and stop your connector from its details page (which you’re already at from the last step).
Note
You can access a data source’s details page from the Data Sources page by clicking on your data source’s name or its Manage button.
Click Start Connector to start data flowing from your data source. Your data source has the RUNNING status.
Your dataset’s Database page shows the data streamed into the dataset. You can get to the page by clicking the dataset name in the navigation under Your Datasets.
Tip
Apperate makes a best effort to derive a schema for your data. You can view the schema and modify it in the schema editor, available by clicking Edit for the dataset. Some changes, such as index changes, require re-ingesting data–this is best to do while the dataset is small.
Please see Updating a Dataset Schema for details.
Stopping Your Connector#
You can stop your connector from its details page.
Note
You can access a data source’s details page from the Data Sources page by clicking on your data source’s name or its Manage button.
In the connector details page, click Stop Connector to stop data flow. Your connector’s status is STOPPED.
Viewing Your API Documentation#
Note, your dataset has an auto-generated API and documentation. From your dataset’s page, click the Overview tab. The Overview appears.
Click Open Docs to view your dataset’s API.
Congratulations! You’ve connected with MySQL data.
What’s Next#
Filter on Custom Dataset Events
Provide rich data through views–joining data from multiple sources