Closed MiConnell closed 5 months ago
@MiConnell yes, you've hit the nail on the head. It's a good question, it was done this way because of queries most often containing lowercase table name (unqualified), and the native parser auto-matches to the correct object. Sling has to do that in order to correctly pull column info from INFORMATION_SCHEMA.
But you're not the first to raise this issue for SQL Server. So I think it's probably best to make that change, that if the table name is mixed-case, special-character or upper, then leave as it.
Will change to below:
defCaseAsIs := hasUpper || hasSpecial
Thanks for raising.
Done: https://github.com/slingdata-io/sling-cli/pull/253/commits/b7082dab015a7e94ac22470fd2ff03ddf30731b7
Watch for 1.2.4
. Closing.
Issue Description
Our SQL Server source database has case sensitivity enabled, meaning table names are case-sensitive. Running the below errors out (logs in the log output section below)
I will note this does work if I quote the table
'"dbo"."TABLE"'
confirmed with
Sling version (
sling --version
): Version: 1.2.3Operating System (
linux
,mac
,windows
): linuxReplication Configuration:
-d
):It looks like this stems from ParseTableName - is there a reason that the names are converted to lowercase? I understand only mixed-case or special-character names are not transformed, and Oracle and Snowflake are uppercased (which makes sense) but why not query the objects as they're configured?