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'
)
...
질문됨 2년 전685회 조회
1개 답변
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
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠