MySQL

From Starfish ETL
Revision as of 14:37, 30 October 2014 by Jkuehlthau (talk | contribs) (Created page with "=MySQL Origin= ==Sample Origin Filter== Note that the connection string must match the sample connection string shown in Starfish: server=<server_name>;uid={0};pwd={1};datab...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

MySQL Origin

Sample Origin Filter

Note that the connection string must match the sample connection string shown in Starfish:

 server=<server_name>;uid={0};pwd={1};database=<db_name>;

The string components must be placed in that order. {0} is a variable that refers to the Username field. {1} is a variable that refers to the Password field.

Use standard MySQL statements.

When connecting directly to a Sugar MySQL database, and possibly other databases, when running a standard MySQL query, it can fail when a field type is a standard MySQL ID field which requires 32 characters and Sugar uses the id "1" for the admin team:

 SELECT  id, team_id, name FROM accounts

This will cause an error in the MySQL connector:

 Failed, error message was: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

To resolve this, make sure to cast any Guid fields:

 SELECT  id, cast(team_id as char(32)) id, name FROM kbdocuments