paden-stewart opened a new issue, #30287:
URL: https://github.com/apache/airflow/issues/30287

   ### Apache Airflow version
   
   2.5.2
   
   ### What happened
   
   When passing a select_query into the RedshiftToS3 Operator, the query will 
error out if it contains any single quotes because the body of the UNLOAD 
statement is being wrapped in single quotes. 
   
   ### What you think should happen instead
   
   Instead, it's better practice to use the double dollar sign or dollar 
quoting to signify the start and end of the statement to run. This removes the 
need to escape any special characters and avoids the statement throwing an 
error in the common case of using single quotes to wrap string literals. 
   
   ### How to reproduce
   
   Running the RedshiftToS3 Operator with the sql_query: `SELECT 'Single Quotes 
Break this Operator'` will throw the error
   
   ### Operating System
   
   NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora" 
VERSION_ID="2" PRETTY_NAME="Amazon Linux 2" ANSI_COLOR="0;33" 
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2" HOME_URL="https://amazonlinux.com//";
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow[package-extra]==2.4.3
   apache-airflow-providers-amazon
   
   
   ### Deployment
   
   Amazon (AWS) MWAA
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to