Script in the terminal runs ok, running in a job at Glue return an error in athena

0

Hello, so I have my script that runs an Athena query and sends an email,

When I was testing in my machine in the terminal, running 'python3 name-file.py'. The script works fine, the query is run and the email (that I'm forcing is sent). But we want to automate that, and I created a job in Glue when I run the script on Glue I get an error in Athena recent querys 'TABLE_NOT_FOUND: line 2:21: Table 'awsdatacatalog.produtos-digitais.i_izio_transacoes_loja' does not exist' why this is happening?

the call of the athena:

def get_run_id(): query = '''SELECT partition_0, count(distinct "$path") FROM "i_izio_transacoes_loja" WHERE date("$file_modified_time") = current_date GROUP BY 1 LIMIT 4'''

 response = athena.start_query_execution(
 QueryString=query,
 QueryExecutionContext={
     'Database': 'produtos-digitais',
 },
 ResultConfiguration={
     'OutputLocation': 's3://my-output/',
 }

) return response["QueryExecutionId"]

  • Sorry, don't know how to fix the code to be more readable

Marcelo
질문됨 한 달 전137회 조회
답변 없음

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

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

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

관련 콘텐츠