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.
@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.
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)