I'm not sure this question has already been asked, if so I didn't find it.
For a log project we used table to parametrize our data loading run and get track of their basic configuration.
On the specific side of the pull date we also wanna have the configuration in the table and so we putted three information in it: the base date / the range we use to calculate pull from and pull to timestamps.
My issue here is I wanna call the DATEADD() function using those columns as parameters but I don't know how to unstring those values as 'CURRENT_TIMESTAMP' will not work, just like DATEADD('year',...) will also raise an error cause the parameter should not be a string.
To summ up, from values ['CURRENT_TIMESTAMP', 'year', '-6'] in base I wanna create the call DATEADD(year, -6, CURRENT_TIMESTAMP)
Thanks