# ask-community-for-troubleshooting

Tanmay Kulkarni

09/28/2022, 1:13 PM
Hi everyone! I have some data in a postgres database (AWS Aurora). I want to extract some data using a query, and dump it onto an S3 destination bucket. I know I can configure postgres as a source and S3 as destination. Is there a way in Airbyte to specify the query to be run at the source to extract the data? Like
Copy code
SELECT department, count(distinct employeeId)
FROM Employee
GROUP BY department
Then the result of this query will be dumped on the S3 target.

Harshith (Airbyte)

09/28/2022, 4:14 PM
Hey when you run the schema discovery you should see the tables there and later you can use custoom DBT to basically run analytics over it.

Saj Dider (Airbyte)

11/17/2022, 4:03 PM
Hey @Tanmay Kulkarni, did we answer you question! Let us know and feel free to post more questions in the channel 🙂