Can I use the ID of my saved query to start query execution in Athena SDK?

0

For Athena's SDK, is there a way to start the query execution using the ID of my saved query (NOT the execution ID). I'm currently using Java and Python (boto3), and I'm wondering if there is a functionality that takes the saved query's ID as input and starts the query execution?

For example. I want something in Python as follows:

...
athena_client = boto3.client('athena')
response_query_execution_id = athena_client.start_query_execution( 
        QueryID='the ID of my saved query'
)
...
gefragt vor 2 Jahren685 Aufrufe
1 Antwort
0

Hello,

I am afraid to inform you that start query execution accepts query-string only, it does not accept execution id. Basically start query execution return a query execution id which states query successfully submitted to Athena. Having said that there is not any direct way to start query execution using execution id.

You can consider one approach like use get-query-execution with query id which returns query string and pass this query string in start-query-execution.

aws athena get-query-execution --query-execution-id 

aws athena start-query-execution --query-string
AWS
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen