Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Check out our powerful new search update! You can read more here. Please let us know if you have any feedback by creating a topic here.

Output to Database ... Error Relation already exists


I am trying to output results of a workflow to a database and I keep getting the below error ( the ... lists all the field names)



Error: Output Data (269): Error creating table "geagp_sccost2.s0_engndb_cms_exl_monthly_actuals_r": ERROR: relation "s0_engndb_cms_exl_monthly_actuals_r" already exists;
Error while executing the query
CREATE TABLE "geagp_sccost2"."s0_engndb_cms_exl_monthly_actuals_r" ("op_contract_part" text,"op_value_stream" text,....)


I'm connecting using the ODBC Connection and the User Name does have updater access to the schema.  


Does anyone know what this error is trying to say?  



I think it might be throwing you an error because the table you are attempting to output too already exists. 




Make sure to adjust the highlighted piece of your output to not "Create New Table", if your table exists in your database already. You can change it to "Delete and Append" or "Append" depending on how you are attempting to update the table.


"Delete and Append" = Drop all data and put the data you are feeding it to the table, keeping the same table structure

"Append" = Keep all the data, just add the new data to in the table with the rest of the rows.

 "Overwrite Table (Drop)" = Drop entire table structure and data from database and re-create from scratch


If you are using the In-DB tools you have the same options as the output tool.


-Tony Silva

Alteryx Certified Partner
Alteryx Certified Partner

I have OVERWRITE TABLE (DROP) selected.

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Alteryx Partner

i too had the same issue even after select Overwrite table (Drop)..any idea how to fix? 

Alteryx Certified Partner

Anyone here ever solve the issue?  We're currently having the same issue -- Overwrite is selected but it's returning the error that "Cannot Create Table, relation already exists".

Hello All,


I was getting this error in one of my workflows too and after many hours of scouring forums I discovered that I had left a space before the schema name in the 'Table Name' textbox. When I removed this, the error disappeared.


This may not be the same issue for other users, but I thought I would mention just in case it helps anyone else.


Happy Alteryxing!


The solution marked is not a global solution. I still get the same issue. I have marked the output option as "Overwrtie Table (drop)" but Alteryx thinks that I am trying to create a new table. 

Will Alteryx be fixing this bug? I am unable to schedule any jobs on the server, which ultimately make the server useless to us.


I was having the same issue when overwriting an existing table on SQL Server using the Data Stream In tool.  When I removed the [square brackets] around the schema in the 'Table Name' window, the issue was resolved.