Hi @edurmush, thanks for getting back to me. Your solution does work.
I also was able to develop another solution using this retool community post where the download data button triggers the download_data_query (a JS query) which runs the full_query (a SQL query) and then exports the data on success