Output to Database ... Error Relation already exists
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
Solved! Go to Solution.
- Labels:
- Database Connection
- Output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have OVERWRITE TABLE (DROP) selected.
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
i too had the same issue even after select Overwrite table (Drop)..any idea how to fix?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I've had the same issue. In my case the problem was caused by a database view that was referencing to this table. As soon as I dropped the view I had no more problems overwriting the table. Offcourse you're losing the view so as a solution I dropped the view in a pre SQL statement and created it again in the post SQL statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@ThibautCasier @MatthewYoung @Mogul1 @Kevigan @lparrett
Any update to this question please ?
I had a running bulk loader that overwrite(drop) into postgres database (new release v2020.3)
Worked find on a weekly schedule but this week it failed with below issue.
Error: Output Data (405): Error creating table "": ERROR: relation "" already exists;
Error while executing the query
CREATE TABLE "".""."" ("))
Any updates will be really helpful. I tried recreating the output step too but no success...Thanks
