Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Running "Drop table " sql command in alteryx

Ratul
6 - Meteoroid

Hi , 

      i cannot run drop table command in alteryx dynamic input tool .

Whenever im trying to do so 

im getting two errors 1. identifier too long 

                                  2.table or view does not exists 

for the second error just after getting the table or view doesnot exists error whenever im running the select * query , im getting a proper result , if the table really did not existed at the time of dropping then how im i getting the results in case of select statement . 

     If this is not the way then please tell me a way out how can i drop a preexisting table from the database . 

any help ASAP is highly appreciated . 

Thanks . 

1 REPLY 1
Claje
14 - Magnetar

Hi,

Are you looking to drop from just one static table, or from a dynamic set of tables determined at runtime?

The "Pre-SQL" and "Post-SQL" steps in the Input and Dynamic Input tools (or the Output Data tool) are the best place to implement a Drop Table in Alteryx.

 

Please note that Pre-SQL will attempt to evaluate every time your workflow configuration changes by default (basically every time you touch a tool), so it may not be a desired location for a function as potentially damaging as "Drop Table".   There is an option in the Input Data tool and the Dynamic Input tool (line 9) that allows you to disable that feature, but I would be very careful to confirm that this does not run at a time when you don't want it to.

 

If you are trying to write date into the table as a next step, the Output Data tool has options to accomplish this before write using "Overwrite Table (drop)".  I'd recommend taking a look at that if you are dropping and recreating these tables for a data write.

Labels