KevinYanesG commented on issue #21457:
URL: https://github.com/apache/airflow/issues/21457#issuecomment-1035099486
I actually already tried with `DROP TABLE <name>`, it didn't work either.
With
```bash
./airflow.sh airflow db shell <<EOF
DROP TABLE EMPLOYEES_TEMP IF EXISTS CASCADE;
DROP TABLE EMPLOYEES IF EXISTS CASCADE;
CREATE TABLE "Employees"
(
"Serial Number" NUMERIC PRIMARY KEY,
"Company Name" TEXT,
"Employee Markme" TEXT,
"Description" TEXT,
"Leave" INTEGER
);
CREATE TABLE "Employees_temp"
(
"Serial Number" NUMERIC PRIMARY KEY,
"Company Name" TEXT,
"Employee Markme" TEXT,
"Description" TEXT,
"Leave" INTEGER
);
EOF
```
After running the DAG I still get
```python
psycopg2.errors.UniqueViolation: duplicate key value violates unique
constraint "Employees_temp_pkey"
DETAIL: Key ("Serial Number")=(2) already exists.
CONTEXT: COPY Employees_temp, line 2
```
--
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]