Using dbExecute to run a query that contains a storage account key fails with Error: nanodbc/nanodbc.cpp:1617: 42000: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
Running the same thing using RODBC's sqlQuery is successful. Running the same SQL query in SQL Server Management Studio also works.
My guess is it has to do with the way the characters in the storage account key are encoded before being send to the data warehouse, especially the / and + characters, but I am not sure. If that is the issue, I am also not sure how to change how the key is encoded.
Database
Azure Data Warehouse/Synapse Analytics
Reproducible Example
Difficult to give a reproducible example because of the specifics but here is the code I'm running:
Issue Description and Expected Result
Using dbExecute to run a query that contains a storage account key fails with Error: nanodbc/nanodbc.cpp:1617: 42000: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
Running the same thing using RODBC's sqlQuery is successful. Running the same SQL query in SQL Server Management Studio also works.
My guess is it has to do with the way the characters in the storage account key are encoded before being send to the data warehouse, especially the / and + characters, but I am not sure. If that is the issue, I am also not sure how to change how the key is encoded.
Database
Azure Data Warehouse/Synapse Analytics
Reproducible Example
Difficult to give a reproducible example because of the specifics but here is the code I'm running: