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'
)
...
posta 2 anni fa685 visualizzazioni
1 Risposta
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
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande