I am creating glue job creation using Java Sdk. It has only two required params Command and Glue version. But i need to create job with auto script generation. As we can do from console, we add data source, A proposed script generated by AWS Glue, Transform type, Data Target, schema n all. how to add these parameters to glue job using java sdk or even with aws glue api.
CreateJobRequest req = new CreateJobRequest();
req.setName("TestJob2");
req.setRole("GlueS3Role");
req.setGlueVersion("1.0");
JobCommand command = new JobCommand();
command.setName("glueetl");
command.setPythonVersion("3");
**// S3 location need not to be given, as script code is auto generated by AWS glue
command.setScriptLocation(S3ScriptLocation);**
req.setCommand(command);
AWSGlue glueClient = AWSGlueClientBuilder.standard()
.withRegion(Regions.US_EAST_1)
.withCredentials(new AWSStaticCredentialsProvider(creds))
.build();
glueClient.createJob(req);
}