Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Teradata Default Column Value

kdkfjhasin
5 - Atom

Hello,

 

I have created tables within Teradata that include the column 'TS_IMPORTED,' which is the Timestamp when the import occurs.  I have done this with HANA and it works, but when importing to Teradata it errs with the message that the column count differs.  Creating a field in Alteryx for 'TS_IMPORTED' fixes it, but the timestamp differs between records.  How do I import everything but the timestamp field, and let Teradata fill the default value?  I am using the Teradata Bulk Loader and the Output Data Tool from the 'In/Out' menu.

 

CREATE SET TABLE test
, FALLBACK
, NO BEFORE JOURNAL
, NO AFTER JOURNAL
, CHECKSUM = DEFAULT
, DEFAULT MERGEBLOCKRATIO
(
ID CHAR(7) CHARACTER SET UNICODE NOT CASESPECIFIC NOT NULL
, HIERARCHY VARCHAR(7) CHARACTER SET UNICODE NOT CASESPECIFIC NOT NULL
, VALID_FROM DATE NOT NULL
, VALID_UNTIL DATE NOT NULL
, TS_IMPORTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP(6) NOT NULL
)
UNIQUE PRIMARY INDEX
(
EID
, HIERARCHY
, VALID_FROM
);

 

4 REPLIES 4
kdkfjhasin
5 - Atom

Nobody knows?

apathetichell
20 - Arcturus

Is your Terradata connection coming in from In-DB? If so could you use something like the attached macro to select all of the fields from your db except the timestamp field?

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Dynamic-Select-with-In-Database-Too...

kdkfjhasin
5 - Atom

Thank you for the response, but no, it is external.  It uses the Input tool from the In/Out menu because it imports data from another database.

PhilW
5 - Atom

Simply exclude it from the Insert Columns List:

INSERT test (ID,HIERARCHY,VALID_FROM,VALID_UNTIL)VALUES (:ID,:HIERARCHY,:VALID_FROM,:VALID_UNTIL)

INSERT test (ID,HIERARCHY,VALID_FROM,VALID_UNTIL)SELECT ID,HIERARCHY,VALID_FROM,VALID_UNTIL FROM ...
Labels
Top Solution Authors