Using SET function before the actual query

I need to run a SET command before running my query, as this is a federated query between Redshift and RDS, and if I don’t run this command the federation will not work:
set pg_federation_repeatable_read to false;
How can I incorporate this into my dataset (the SET + my actual query)?
Any other workarounds you can recommend?

What I’ve tried and didn’t work:

  1. set pg_federation_repeatable_read to false; select * from redshift join rds;
    This seems to run only the first command (the SET function) and returns 0 rows (I know for certain that my query should return multiple rows).

Appreciate any help here!

Hi @GZ999 - Thanks for the question, I believe it is not possible to set the command first and then run the sql.

Hi @Kaushik_Damarla @Ramon_Lopez - Need your advise on this.

Regards - Sanjeeb

Thank you Sanjeeb! @Kaushik_Damarla , @Ramon_Lopez any insights here?

Thats correct @Sanjeeb2022 - any chance this can be wrapped up into a view?

Hi @Ramon_Lopez - Good suggestion. However not sure whether it will work or not.
Hi @GZ999 - Is it possible to create a view and add these 2 statements and test once as per @Ramon_Lopez

Regards - Sanjeeb

Hi @GZ999,
It’s been a while since we last heard from you, were you able to try out the above suggestions or do you have any remaining questions regarding the original topic?

If we don’t hear back in the next 3 business days, I’ll go ahead and archive this topic.

Thank you!

Hi @GZ999,
Since we have not heard back from you, I’ll go ahead and archive this topic. If you have any further questions, feel free to create a new topic in the community and link this discussion for relevant information.

Thank you!