Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Table Name Append

dlash
6 - Meteoroid

I am looking to make a copy of a very large table from SQL Teradata (80 columns millions of rows) and append the current date to the table name monthly for historical backups.

 

I have a workflow that does this using Teradata bulk but it is taking about 10 minutes and I have 8 tables. I am hoping there is a faster way.

Input -> Formula to create the date as a column -> Output using that column to append.

 

I can quickly make a copy of the table using PreSQL and the output tool is great at appending to the table name, but I don't know how to put the two together because of the calculation that is needed.

2 REPLIES 2
Prometheus
12 - Quasar

@dlash I wouldn't use the Formula tool because it'll give you different datetimes, if you're looking for datetimes. I would use a Date Time Now tool and bring it in with an Append Fields tool so you have the same one date on every record.

Append Date.PNG

dlash
6 - Meteoroid

Apologies, I oversimplified, I need to append #QYY (ex. 2Q23) which is why I need the formula tool. 

 

DateTimeFormat(DateTimeNow(),'%yQ') + ToString(Ceil(ToNumber(DateTimeFormat(DateTimeNow(),'%m'))/3)-1)

Labels