MySQL agent
A MySQL agent can be used as a source and can serve as a destination for:
- Excel
- MySQL
- ODBC/ODBC32
- PowerBI
- SQL Server
- Text
Add a connection
To add a connection for a MySQL agent:
- In the navigation panel, select Setup.
- Select a MySQL agent or peer connection, and click > Add Connection.
- Connection Name must be unique. Up to 40 characters.
- Connection Method:
- Cloud DSN: (Default option) Points to the Staging Database.
- Standard: When selected, the following appear:
- Username: Up to 32 characters.
- Password: Up to 32 characters.
- Host Name: Up to 256 characters.
- Port: Up to 5 digits; an unsigned integer from 1 to 65535. Default is 3306.
- Database: Up to 64 characters.
- Use SSL: Off by default. Turn on to require SSL mode.
- Click OK.
Add a query
- Select a SQL connection or peer query, and click > Add Query.
- Query Name must be unique. Up to 40 characters.
-
In Query, type or paste your MySQL query.
Example of a query with parameters:
Note: Within the body of your SQL script, you must preprend @ to all parameters. For example, startDate must appear as @startDate.
The same query viewed in the Data Integration process:
- If the query has parameters, add them to the Filters table:
Name: The parameter name. Up to 50 characters.
Tip: In the filter table, don't prepend "@" to the parameter names.
- Type: The parameter's data type (text or numeric). (For date values choose text.)
- Default value: What the user sees in the Data Integration process and can edit. Up to 50 characters.
- Sample value: What the user sees when hovering over the cell in the Data Integration process. Use it to show the expected input/format. Up to 50 characters.
- Hide: Turn on if you want to keep users of the Data Integration process from seeing the parameter, while using its Default value in the query.
- Click Save.