Ask Your Question
0

How can I use several pgsql queries in the aws_s3.query_export_to_s3 function?

asked 2023-07-07 00:40:25 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-07-07 01:00:01 +0000

qstack gravatar image

You can use the awss3.queryexporttos3 function to execute several pgsql queries by concatenating them using the ';' separator.

For example, if you want to execute two queries, you can do it as follows:

SELECT * FROM table1; SELECT * FROM table2;

The above query will first execute the SELECT statement on table1 and then execute the SELECT statement on table2. Both these query outputs will be exported to the S3 bucket specified in the queryexportto_s3 function.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-07 00:40:25 +0000

Seen: 11 times

Last updated: Jul 07 '23