Howdy. Is it possible to invoke Glue Job using Pre...
# prefect-community
b
Howdy. Is it possible to invoke Glue Job using Prefect?
1
p
You can use the boto3 library for that: Glue — Boto3 Docs 1.26.46 documentation (amazonaws.com)
b
Would you mind sharing an example on how to do that?
p
Copy code
glue = boto3.client('glue')
job_run_id = glue.start_job_run(JobName=f'{job_name}')
And you can fetch the status of the job with:
Copy code
glue.get_job_run(JobName=job_name, RunId=job_run_id.get("JobRunId")).get("JobRun").get(
        "JobRunState")
b
Thanks!