KevinYanesG edited a comment on issue #21457:
URL: https://github.com/apache/airflow/issues/21457#issuecomment-1035002332
Thanks to you!
I tried
> airflow db shell <<EOF ...
But unfortunately, after trying many different things, I didn't bring it to
work, probably because of little experience in Airflow / Postgres.
A very brief summary of what I tried after deleting the `cur.execute()`code:
- `./airflow.sh airflow db reset`
- `./airflow.sh airflow db init`(just in case)
- `./airflow.sh airflow db shell <<EOF ...`
- run the DAG
- Got the error
```
psycopg2.errors.UniqueViolation: duplicate key value violates unique
constraint "Employees_temp_pkey"
ERROR: relation "Employees_temp" already exists
```
(I wonder why this error didn't appear when using the `cur.execute()`)
- Tried to solve it with https://stackoverflow.com/a/21639138, but when
`pg_get_serial_sequence("Employees", "Serial Number")` there was no output, the
[solution](https://stackoverflow.com/a/54766000) to this seems to go to deep
into PostgresSQL for me to understand it in a reduced amount of time
(I also tried to run the sql commands directly in the shell but also didn't
work)
--
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]