Alteryx Designer Desktop Discussions

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

Need to create empty table(Table Structure)

cvalteryx
7 - Meteor

Hi All,

 

I have a source table(DB - source) with records. I need to create the same table(table structure) in my destination without any records.

 

I created Output tool with create table, it's inserting records as well.

I tried limiting records in source but it's of no use.

 

Can any one please suggest any better approach?

 

I need to accomplish this without any "CREATE" statement.

 

TIA

3 REPLIES 3
Adrian_T
Alteryx
Alteryx

Hey @cvalteryx 

 

The "Create New Table" option in the Output Data Tool will do what it says without the need to use a CREATE statement.

 

If your intended output table schema is the same as the source table, this might work:

 

1. Stream source table into Alteryx using a LIMIT 1 query (image example below)

2. Use the Sample Tool to Skip 1st Row of Data - this will give you an empty table in Alteryx

3. Use the Output Data Tool to Create a New Table in your DB

 

Adrian_T_0-1655486494716.png

 

Adrian_T_1-1655486696765.png

 

cvalteryx
7 - Meteor

Hey @Adrian_T,

 

Awesome. It worked as expected and created just schema.

 

Thanks a lot!

 

 

thulasir
6 - Meteoroid

Hi

 

I am trying to create temp table, insert Ordernumber via  csv.file

I am not able to insert ordernumber

 

Temporary table : mytable_order

Empty field : ordernumber

 

I am getting error while inserting

 

CREATE VOLATILE TABLE mytable_order, LOG
(
Ordernumber VARCHAR(17)
)
ON COMMIT PRESERVE ROWS;

 

INSERT INTO mytable_order
VALUES ('55555555555555555')

 

Labels