MySQL
Visier can retrieve data through this connector if the following requirements are met.
This data connector retrieves data stored in MySQL.
If table sources are enabled, you can select the source type during connector credential creation. Select one of:
- File sources: File-based containers that use regex and override behavior to manage data. For more information about acceptable files, see Data File Guidelines.
- Table sources: Row-based containers that support incremental updates and SQL transformations during sync. For more information, see Use SQL with Table Sources.
The following table describes the differences between the behavior of each source type.
|
File sources |
Table sources |
|---|---|
|
Each data transfer or extraction outputs to a unique file. |
Each data transfer or extraction directly modifies the same table. |
|
Use Visier Extraction Language to query records in a source's Records tab or SQL to query sources in the Data > Query room. For more information, see Query Source Data. |
Use Spark SQL to interact with the table data. For more information, see Use SQL with Table Sources. |
|
To delete an individual's data, such as for GDPR compliance, open a Visier Technical Support ticket to remove the information one-by-one from every extracted file. |
To delete an individual's data, such as for GDPR compliance, use a DELETE SQL query on the table without contacting Visier Technical Support. Note: The snapshot retention period specifies how long to keep previous snapshots of tables before permanently deleting them. You can set the retention period between 1 and 180 days. The default is 3 days. |
|
The data is available in the Data Transfers room. For more information, see Navigate Studio. |
The data is available in the associated table source in the Sources room. For more information, see Sources. |
|
Exclude or delete uploaded files individually. Files load in order by snapshot time. |
Use the Reset action to roll the table back to a particular timestamp. This rolls back all changes since the timestamp. You can't easily undo actions or apply changes out of order. Tables do not keep a complete history of every action. |
|
Optionally enable Snap to midnight setting to move the snapshot time to the start of the day. |
Actions are applied strictly in order. |
|
Files uploaded manually or by SFTP connect to the source using a file regex. |
Because you upload files directly into a table source, files uploaded manually in the Data Transfers room or by SFTP cannot connect to the source. |
You cannot change the source type after creating a credential. To use a different source type, create a new credential.
Prerequisites
- Create an integration user in MySQL.
- Allow network and data traffic between Visier and your source system. For more information, see Allow Visier Connections.
Integration user
Create an integration user in your source system and assign it the appropriate security access so that Visier can retrieve your source data through this user.
|
Access |
Description |
|---|---|
|
SELECT |
Grant Select privileges on the tables you want Visier to access. |
|
INFORMATION_SCHEMA |
Grant query access to INFORMATION_SCHEMA. |
Connector credentials
Create a connector credential in Visier to authenticate and authorize access to your source system. Connector credentials can be created in Studio or through an API. For more information, see Set Up Data Connectors and "Create a connector credential" in API Reference. You will need to provide the following credentials in your connector credential configuration.
|
Credential |
Description |
Example |
|---|---|---|
|
Host |
The hostname or IP address of the MySQL server. |
mysql.example.com |
|
Port |
The port number of the MySQL server connection. |
3306 |
|
Database |
The name of the database to retrieve data from. |
hr_database |
|
Username |
The integration user's username. |
integration.user |
|
Password |
The integration user's password. |
Password1234 |
Data files
The MySQL data connector retrieves data stored in MySQL for use in Visier. Any additional data must be provided through alternative methods, such as flat files or other data connectors. For more information, see Bring Data In.
How the connector loads data
Initially, data connectors retrieve a full history for each subject to generate an initial history of events. In each subsequent data retrieval, each connector handles the data load differently.
- Full load: All data from the source system is loaded into Visier.
- Delta load: Only changed data is loaded into Visier. A delta load may take either the entire history or a specific number of years of history for each changed record.
- Snapshot load: All data at a particular point in time. A snapshot load does not contain historical records or show changes over time.
- Partial load: A subset of data is loaded into Visier.
After the initial load, this connector only retrieves data for changed records.
ID Range extraction for large tables
If extracting large tables is slow and the table includes a numeric-based auto-incrementing column, typically an AUTO_INCREMENT primary key, you can try ID Range extraction.
With ID Range extraction, the column's minimum and maximum values are read, the range is divided into fixed-size chunks, and each chunk is fetched using a bounded WHERE batch_key >= ? AND batch_key < ? query. This helps maintain a consistent extraction time regardless of table size. ID Range extraction supports both full and delta loads. For delta loads, each chunk is additionally filtered by the table's last-updated date column.
To enable this feature, contact Visier Technical Support.
Configure a batch key
After ID Range extraction is enabled for your tenant, configure a batch key for each table that uses it.
To configure a batch key for a table in a project:
- In the Customize tab of the connector, select a table.
- Expand the Extraction Settings section.
- In the Batch key column list, select the column you want to use as the batch key.
The batch key column must be an integer-based column whose values increase as rows are added, such as a MySQL AUTO_INCREMENT primary key (INT or BIGINT). BIGINT UNSIGNED and negative values are also supported.
The batch key column should be indexed. A primary key meets this criteria and allows each range query to use an index seek.
In the following example, employee_id is an ideal batch key for the table.
CREATE TABLE employee_profile (
employee_id BIGINT AUTO_INCREMENT PRIMARY KEY,
...
);
Considerations
- ID Range extraction is configured per table. Tables without a batch key continue to use the default pagination behavior.
- The batch key is independent of the subject key and composite keys used to identify records.
- ID Range extraction can be less efficient for delta loads. Because the batch key tracks insertion order rather than change order, Visier must scan the entire table on every delta load to find changed rows. Every chunk in the ID range is read and filtered by the last-updated date column, even if only a small number of rows changed. If your delta loads affect only a small fraction of the table, the default delta extraction is typically faster.
- If the batch key column can't be used—such as when the column doesn't exist or has an unsupported data type—Visier automatically falls back to the default pagination behavior for that table rather than failing the extraction job.