I would like to use a recursive CTE to generate a series of dates. I am using this CTE to cross join onto locations to generate a mapping table as a CTE where each location has a row for each date. This query works great in my SQL Client (DBeaver), but Amazon QuickSight throws me the following:
Invalid operation: Recursive CTE in subquery are not supported.
SQL Query:
with recursive date_range(planned_date) as (
select date(dateadd(day, -49, date(date_trunc('week', dateadd(day, 1, current_date)) - 1))) as planned_date
union all
select date(dateadd(day, 1, planned_date))
from date_range
where planned_date < date(dateadd(day, 1, current_date))
)
select * from date_range
I have seen others with similar issue on Tableau even, but no shared solution in forum yet. Are there any workarounds or is this case simply not available to perform on Amazon QuickSight without having to create a calendar table?
generate_series.