ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Loader MySQL

MySQL is an open-source relational database management system (RDBMS) widely utilized for managing and organizing structured data. It employs a client-server model, where a client can interact with the database server to perform various operations like querying, updating, and managing data. MySQL is known for its reliability, scalability, and ease of use, making it a popular choice for businesses and developers.

Business value in CDP

By integrating MySQL as a data destination, businesses can efficiently store and retrieve customer data, enabling seamless data analysis, reporting, and integration with other applications. This capability enhances the overall data management process within a CDP, facilitating businesses in gaining actionable insights and making informed decisions based on their customer data.


Setting up the loader in MI

Loader MySQL imports CSV data into MySQL database.

Data In/Data Out

Data In Upload all files in /data/in/files
Data Out N/A

Learn more: about the folder structure here.

Parameters

DB

MySQL 1.png

Host (required) Name of the server that hosts the database.
Port (required) The port number you want to access. 
Database (required) Name of the database.
User (required) Account name. 
Password (required) Account password. 
SSH

MySQL 2.png

Enabled (optional) Checked if SSH required to connect to database. 
Private (optional) Private key. 
Public (optional) Public key.
SSH Host (optional) Name of SSH host.
Table

MySQL 3.png

Input Table (required) The name of the input table you want to load to the database. 
DB Table Name (required) The name of the table that will be created in the database. 
Incremental (optional) Signifies if you want to load the data by overwriting whatever is in the database or incrementally.
Column (required)

Can be defined for table either when using incremental load, or not. 

 

Primary key constraint can be defined on multiple columns or one, but cannot contain NULL values. If incremental load is enabled, then only rows with new or updated records are inserted.

 

If the incremental load is disabled but primary keys are defined: full table is loaded (and will replace whatever is in the destination database), but primary key columns will show as primary keys also in destination table structure.

 

Column

MySQL 4.png

Column Name (required) Refers to the column in the input CSV file.
DB Column Name (required) Refers to how this column will be named in the destination database.

Data Type (required)

The data type used in the column.

Size (optional)

The maximum number of digits used by the data type of the column or parameter.

Nullable (optional)

If checked, then the data with empty strings are loaded as NULL values in the destination database (in this case is_nullable = YES).

 

If unchecked and data contains empty strings, then loader returns an error message. For example: “Cannot insert the value NULL into column XY, column does not allow nulls. INSERT fails.”

 

Warning: All columns listed as primary keys should have unchecked Nullable (is_nullable = NO), otherwise the loader throws an error “Cannot define PRIMARY KEY constraint on nullable column”.

 

Default Value (optional)

The default value is inserted for empty values in the column. For example,  inserts NULLs in the destination columns database for empty strings in csv file. - inserts - for empty strings.