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'
)
...
feita há 2 anos686 visualizações
1 Resposta
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
respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas