Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataMapper tool not evaluating JmesPath expressions / MatchedTokens #139

Closed
HariKorrapati opened this issue Oct 26, 2021 · 3 comments
Closed

Comments

@HariKorrapati
Copy link

Based on the documentation available at Calculatedcontenttemplate, we can choose to use JmesPath expression language instead JSON Path language. However we see this is not working with the data mapper tool.

We feel there are multiple issues around the data mapper tool

  1. JmesPath expressions are not working, also tried the custom function fromUnixTimestampMs mentioned in fromUnixTimestampMs
  2. Matched Token example provided in the documentation is not working.

MatchedToken-Error

3. If the expressions have AND operator (**&&**), it is being escaped to **&&** everytime the template is saved and reloaded. However the tool fails to evaluate the expressions if the && operator is escaped

Ampersand_EscapeSequence

  1. Data mapper tool is always treating the template type as JSON Path, even if we use Jmes expressions.
@dustinburson
Copy link
Member

@HariKorrapati thank you for the feedback. Currently, as you noted, the DataMapper tool hasn't been updated to support CalculatedContent yet. It is in our backlog and something we in the process of prioritizing.

@HariKorrapati
Copy link
Author

HariKorrapati commented Nov 8, 2021

Thanks @dustinburson for the response.

While the data-mapper tool may not support the CalculatedContent yet, I noticed that there are test cases around CalculatedContent template and they do work fine. However when we use the templates given in test cases on server, we are getting the below error
Exception while executing function: NormalizeDeviceData One or more errors occurred. (Unable to extract required value for [DeviceIdExpression] using $.Body.deviceId)

Is there anything we are missing?

References:
Test Class: CalculatedFunctionContentTemplateDocumentationTests
Test Case: MultipleMatches_And_UsingParentScope_Test

@dustinburson
Copy link
Member

DataMapper tool has been retired in favor of the mapping debugger that is built into the PaaS service in Azure portal.

@dustinburson dustinburson closed this as not planned Won't fix, can't repro, duplicate, stale Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants