uranusjr commented on a change in pull request #17974:
URL: https://github.com/apache/airflow/pull/17974#discussion_r702756827



##########
File path: airflow/hooks/dbapi.py
##########
@@ -286,11 +300,19 @@ def _generate_insert_sql(table, values, target_fields, 
replace, **kwargs):
         else:
             target_fields = ''
 
-        if not replace:
-            sql = "INSERT INTO "
+        if not before_statement:
+            if not replace:
+                sql = "INSERT INTO "
+            else:
+                sql = "REPLACE INTO "
         else:
-            sql = "REPLACE INTO "
+            sql = f"{before_statement} "

Review comment:
       ```suggestion
               sql = f"{before_statement} {sql}"
   ```
   
   ?




-- 
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