- Newest
- Most votes
- Most comments
To specify the data source when using the passthrough query feature in Athena, you can use the data_source parameter within the system.query() function. Here is how you can do it.
In your SQL query, use the system.query() function to pass the query to the connector, and specify the data_source parameter
SELECT * FROM TABLE(system.query(query => 'SELECT * FROM customer LIMIT 10', data_source => 'your-data-source-name'))
Make sure that the data source you specify is configured and available in your Athena environment.
If you are using Metabase to integrate with Athena, you will need to ensure that the data source you are specifying in the passthrough query matches the data source configured in your Metabase integration.
users can add the target catalog to resolve this issue; for example;
SELECT * FROM TABLE(
catalog.system.query(
query => 'SELECT * FROM customer LIMIT 10;'
))
should be the full resolution of the function that the customer can execute; which would allow multiple executing passthrough queries from different connector; of course if the connector supports query passthorugh.
Relevant content
- asked 2 years ago
- asked a year ago

It didn't work. I received the error: INVALID_ARGUMENTS: line 3:13: Too many arguments. Expected at most 1 arguments, got 2 arguments . I guess it didn't like the new
data_sourceargument. Is there detailed documentation on that feature?That depends based on your connector. I was following https://docs.aws.amazon.com/athena/latest/ug/federated-query-passthrough.html might not be supported for bigquery https://docs.aws.amazon.com/athena/latest/ug/connectors-bigquery.html
In my case, I'm using Google BigQuery connector. Any other suggestion on how to tackle this problem?