Hi all
I have data with records spanning multiple months. The query which pulls the data is dynamic (current month plus 3 months back). For example, if I were to run it today, it would pull all records relevant from 01 May through to the current date 9th August (it only pulls historical data, no forecast).
Dates are in this format in each record:
After I run my transformations, I want to be able to save it in separate files by month. e.g. records for May data would be saved in a filed called Data-2023-05, records for June data would be saved in a file called Data-2023-06, etc
Where a file already exists, I want it to overwrite the file/data in the file.
Where the file does not exist, I want it to create a new file for that month
How do I do that?