Salta al contenuto

Which version of JSONata does @AWS StepFunctions support?

0

Which version of JSONata does @AWS StepFunctions support?🤔 Tried the internet and AWS docs but no mention about version support.

JSONata 2.1.0 brought elvis & coalescing operators but those weren’t supported in AWS eu-central-1…..

posta 3 mesi fa246 visualizzazioni
3 Risposte
5

As I know, AWS Step Functions does not publicly specify the exact version of JSONata it supports. This has led to confusion, especially since newer JSONata features like the elvis (?:) and coalescing (??) operators introduced in JSONata v2.1.0 are not supported in Step Functions, even in regions like eu-central-1.

I would suggest to:

  • Use workarounds with conditional logic supported in older JSONata versions.
  • Consider offloading complex transformations to Lambda functions until AWS updates their JSONata engine.
ESPERTO
con risposta 3 mesi fa
0

AWS Step Functions documentation doesn't explicitly mention which specific version of JSONata is supported. While JSONata has been implemented in Step Functions to provide advanced data manipulation capabilities, there are some limitations compared to the full JSONata specification.

For example, the $eval function from JSONata is not supported in AWS Step Functions. Instead, AWS added a special $parse function as an alternative to convert JSON strings into JSON objects.

Regarding the elvis and coalescing operators that were introduced in JSONata 2.1.0, if you've found they're not working in the eu-central-1 region, this suggests that AWS Step Functions might be using a customized implementation or an earlier version of JSONata that doesn't include all the latest features.

AWS Step Functions' JSONata implementation focuses on providing data transformation capabilities while maintaining compatibility with the service's architecture and security model. This means that certain functions or operators from the full JSONata specification might not be available or might work differently within Step Functions.

If you need to use specific JSONata features that aren't supported, you might need to consider alternative approaches, such as using Lambda functions for those particular transformations.
Sources
JSONata with $eval trying to convert JSON string to JSON object | AWS re:Post
AWS Step Functions simplifies developer experience with Variables and JSONata transformations - AWS
Simplifying developer experience with variables and JSONata in AWS Step Functions | AWS Compute Blog

con risposta 3 mesi fa
0

AWS Step Functions does not explicitly mention which specific version of JSONata it supports. However, it is known that AWS Step Functions has implemented JSONata as an open-source query and transformation language to select and transform data in workflows. This allows for advanced data manipulation and transformation, such as date and time formatting and mathematical operations, within Step Functions workflows.

To use JSONata in your workflows, you must opt-in by setting the Query Language field to "JSONata" in your state machine definition. This can be done at the top level of the state machine or within individual states. Once JSONata is enabled, you can utilize its syntax and functions to transform data as needed.

con risposta 3 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.