bug MySQL connector

Rudy Smeets 55 Reputation points
2024-09-25T13:53:24.1066667+00:00

we are using Synapse Analytics and are moving from the Legacy MySQL connector to the current version.

when our source table (MySQL) has a char(36) column we get the following error in our copy data action:
Source=Microsoft.DataTransfer.Common,''Type=System.FormatException,Message=Could not parse CHAR(36) value as Guid: ,Source=MySqlConnector

according to the documentation it should be parsed as String, GUID is not even on the menu. https://learn.microsoft.com/en-us/azure/data-factory/connector-mysql?tabs=data-factory#data-type-mapping-for-mysql

can someone check if this is working as intended, thanks a lot!

it blocks loading some tables now...

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

Accepted answer
  1. Amira Bedhiafi 33,071 Reputation points Volunteer Moderator
    2024-09-25T20:41:15.96+00:00

    Instead of relying on the connector to interpret the CHAR(36) column, you could cast the CHAR(36) column explicitly to a string in the MySQL query itself. For example:

    
    SELECT CAST(your_column AS CHAR) AS your_column FROM your_table;
    
    

    If casting in the query isn't sufficient, consider creating a view or a temporary table that already has the CHAR(36) column cast as a string and use that in your data pipeline.

    Another approach is to handle this transformation directly in Synapse, using a data flow where you map the CHAR(36) column explicitly as a string.

    Given that this could be a bug in the connector, it might be worth raising a formal support ticket with Microsoft to have this issue investigated and potentially fixed.

    If none of these workarounds are suitable for your environment or you continue facing issues, you may want to consider this as a temporary issue to escalate to Microsoft while keeping the current workaround in place.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.