[SQL] Join queries can fail if column PK names are the same across tables #2002
Labels
bug
Something isn't working
community-driven
effort:low
mssql
mysql
postgresql
priority:high
v8.12.0
v8.13.0
Bug Description
An advanced sync rules query like:
Should work, and we expect Joins to be one of the most common use cases for Advanced Sync Rules on SQL connectors. However, this type of Advanced Sync Rule leads to warnings in the logs like:
Blocks like
connectors/connectors/sources/mysql.py
Lines 564 to 568 in 6647771
are in all our SQL connectors, but it's unclear to me what the purpose is, and why we're checking uniqueness for table PKs.
Both Paul and the discuss user have validated that using
AS
in the query to rename selected fields does not help.To Reproduce
ID
columnID
Expected behavior
You should be able to use advanced sync rules for joins, even if the PK columns have the same name.
Environment
8.11-8.13
Additional context
Slack thread: https://elastic.slack.com/archives/C01795T48LQ/p1702570480692019
The text was updated successfully, but these errors were encountered: