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
哈喽你好,我有这么一个想发,不知道能否实现。 source :kafka 比如说kafka中的数据格式如下: { "A":1, "B":2, "C":3, "D":4 } 我想在flink中能够根据kafka中已有的属性按照groovy表达式计算出一个新的属性,将新的属性一起sink到下游。 表达式示例1 得到属性:E if(A != null && B != null) (A - B); else 0; 表达式示例2 得到属性 :F if(A != null){if (A <= 100 && 0 < A ) yes ;else if (A <= 200&&100 < A ) no
最终得到
{ "A":1, "B":2, "C":3, "D":4, "E":-1, "F": yes }
并输出到下游
类似这样的需求不知道有没有什么实现的思路呢?
The text was updated successfully, but these errors were encountered:
@kongweiteng 这个有 SQL UDF 函数可以解决。
Sorry, something went wrong.
No branches or pull requests
哈喽你好,我有这么一个想发,不知道能否实现。
source :kafka
比如说kafka中的数据格式如下:
{
"A":1,
"B":2,
"C":3,
"D":4
}
我想在flink中能够根据kafka中已有的属性按照groovy表达式计算出一个新的属性,将新的属性一起sink到下游。
表达式示例1
得到属性:E
if(A != null && B != null) (A - B); else 0;
表达式示例2
得到属性 :F
if(A != null){if (A <= 100 && 0 < A ) yes ;else if (A <= 200&&100 < A ) no
最终得到
{
"A":1,
"B":2,
"C":3,
"D":4,
"E":-1,
"F": yes
}
并输出到下游
类似这样的需求不知道有没有什么实现的思路呢?
The text was updated successfully, but these errors were encountered: