Alteryx Designer Desktop Discussions

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

Create table from schema definition?

stephs
7 - Meteor

Hi, is there a way to create an empty table from it's schema definition?  i.e., i'd like to be able to load in a text file that defines the table: 

 

CREATE TABLE Geography(
 Id int not null

,Country char(50) not null

,Province char(50) not null 

...

 

 

rather than say, read it in from a db. 

thanks, 

steph 

2 REPLIES 2
MarqueeCrew
20 - Arcturus
20 - Arcturus

Yes it is.  But there is no (public) tool out there that reads the DDL and can create an empty data stream.

 

In looking at the example data what you would really be focused on is what's inside of the outer parenthesis.  Each row contains a field name, data type and rule.  With or without regular expressions, I could find ID, Country, Province.  I could setup a row for each field name and based upon the data type, put a value into a field.  This is the result:

 

NAME|VALUE

ID|64000

Country|ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

Province|ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

 

That data would be sent into a CROSS TAB tool and I would now have:

 

ID|Country|Province

64000|ZZZ...ZZZ|ZZZ...ZZZ

 

I now have the construct of the empty table (after I sample and skip the first 1 row).

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
stephs
7 - Meteor

Thanks Mark. this should work. 

steph. 

Labels