We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@attributes
Description: Currently, the @attributes annotation cannot be used with sinks the same way they can be used with sources.
For instance, this mapping
@map(type='json', enclosing.element="$ @attributes(symbol = "company.symbol", price = "price", volume = "volume"))
would correctly parse the following json, when used on a source:
{ "company" : { "symbol": "AAPL" }, "price": 1234, "volume": 1000 }
but does not work when used one a sink, to produce the same json from for instance the following stream:
define stream TestStream(symbol string, price int, volume int)
The text was updated successfully, but these errors were encountered:
@pierre-borckmans currently the option we have for sinks is to use @payload
@sink(type='...', @map(type='json', enclosing.element='$', @payload( """ { "company" : { "symbol": "{{symbol}}" }, "price": {{price}}, "volume": {{volume}} }"""))) define stream BarStream (symbol string, price float, volume long);
We'll try to incorporate your suggestion in future releases by constructing the JSON from XPath.
Sorry, something went wrong.
No branches or pull requests
Description:
Currently, the
@attributes
annotation cannot be used with sinks the same way they can be used with sources.For instance, this mapping
would correctly parse the following json, when used on a source:
but does not work when used one a sink, to produce the same json from for instance the following stream:
The text was updated successfully, but these errors were encountered: