Thank you for the solution! It helped my use case, where I was trying to generate one row for each month between an employee’s START_DATE and END_DATE. I adjusted the code from the solution to:
SELECT
EE_NUMBER,
LAST_DAY(DATEADD(MONTH, VALUE::INT, START_DATE) AS DATE_OF_EXPORT,
END_DATE
FROM STG_MAIN_DATA,
TABLE(FLATTEN(ARRAY_GENERATE_RANGE(0, DATEDIFF(MONTH, START_DATE, END_DATE)+1)));
I`ll leave this in this thread, in case it might be useful for someone in my situation.