josh-fell commented on code in PR #29158:
URL: https://github.com/apache/airflow/pull/29158#discussion_r1091430214


##########
docs/apache-airflow/tutorial/pipeline.rst:
##########
@@ -170,7 +170,7 @@ Here we select completely unique records from the retrieved 
data, then we check
               FROM employees_temp
           ) t
           ON CONFLICT ("Serial Number") DO UPDATE
-          SET "Serial Number" = excluded."Serial Number";
+          SET "Serial Number" = t."Serial Number";

Review Comment:
   Looks like the issue with the subquery alias was already handled in #28353. 
The update should be done with `excluded` values. 
   
   However, this merge query doesn't make any functional sense. It's trying to 
insert into `employees`, if there is a unique constraint violation on `Serial 
Number` then update `Serial Number` with the value that caused the violation 
(aka update `Serial Number` with its own value). If there is a unique 
constraint violation, it would make more practical sense to update other 
columns from the `excluded` values.
   ```suggestion
             SET
                   "Employee Markme" = excluded."Employee Markme",
                   "Description" = excluded."Description",
                   "Leave" = excluded."Leave";
   ```
   WDYT? This update would be needed in all appropriate places in the doc.



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