Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in AWS by (5.6k points)

With the help of AWS DataPipeline API, I'm trying to evaluate the expression below,

sometext-#{format(@scheduledStartTime, 'YYYYMMddHHmmss')

I have used "PipelineObject" which looks like this:

Id:@MyPipelineObject_2018-08-26T01:00:00

Name:@MyPipelineObject_2018-08-26T01:00:00

     - Key:@scheduledStartTime

     - StringValue:2018-08-26T01:00:00

     - Key:@scheduledEndTime

     - StringValue:2018-08-27T01:00:00

So how can I evaluate the expression when I know the Pipeline and pipelineObjectId?

1 Answer

0 votes
by (12.4k points)
edited by

Here the DataPipeline has a method "evaluateExpression()" that takes an EvaluateExpressionRequest and returns the EvaluateExpressionResult.

You'll get an evaluated results just by calling 'getEvaluateExpression' on the returned object.

EvaluateExpressionRequest evaluateExpressionRequest = new EvaluateExpressionRequest()

                .withPipelineId(myPipelineId)

                .withExpression(expressionToBeEvaluated)

                .withObjectId(myPipelineObjectId);

dataPipeline.evaluateExpression(evaluateExpressionRequest).getEvaluatedExpression(); //evaluates to sometext-20180826010000

Hope that helps!

Interested to know about AWS? Come & join AWS Training provided by Intellipaat.

Related questions

0 votes
1 answer
asked Dec 29, 2020 in AWS by Amyra (12.9k points)
Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...