Reputation: 277
I have used below code to invoke Glue job from Lambda written in Java. How do I get the status of the job ?
AWSGlue awsGlueClient = AWSGlueClient.builder().withRegion("us-east-1").build();
StartJobRunRequest jobRunRequest = new StartJobRunRequest();
jobRunRequest.setJobName("my_transformer");
jobRunRequest.addArgumentsEntry("--Mode",mode);
jobRunRequest.addArgumentsEntry("--Paramfile",paramfile);
StartJobRunResult jobRunResult =
awsGlueClient.startJobRun(jobRunRequest);
Upvotes: 1
Views: 2159
Reputation: 10704
We are building new Java V2 examples to work with AWS Glue. Once done, I will post a link to these new V2 examples. We will cover common use cases like how to create a crawler, how to start a crawler, and so on.
UPDATE See the GlueScenario.java example that demonstrates how to perform multiple AWS Glue operations.
Upvotes: 0
Reputation: 2224
The startJobRun function/action returns "JobRunId" which is a UTF-8 string and represents the ID assigned to current job run.
The GetJobRun function/action retrieves the metadata for a given job run. It takes the JobRunId as input and returns a JobRun object from which you can pull out current job status.
Reference AWS documentation :
AWS Glue Job Run Object structure
Upvotes: 1