Replace string value to integer value in NiFi within a same column

后端 未结 2 1514
栀梦
栀梦 2021-01-21 12:26

I want to replace a \'string value\' and enter that value as an Integer Value using Nifi ReplaceText. I do not know how to achieve this in NiFi.

So my

2条回答
  •  忘掉有多难
    2021-01-21 13:27

    What @Shu had suggested would work well but in case the number of lookups to be done is more or increasing, I would highly suggest to use the LookupRecord processor and configure it with a SimpleKeyValueLookupService for starters since your CASE statement would grow heavy and troublesome.

    So your flow can be altered to something like

    For a look on how to use, take a look at the simple template provided here : https://gist.github.com/zenfenan/37eb1e4cd0e59a63e85b0400040720b6

    Useful links:

    • https://community.hortonworks.com/articles/138632/data-flow-enrichment-with-nifi-lookuprecord-proces.html

    • https://medium.com/@abdelkrim.hadjidj/data-flow-enrichment-with-apache-nifi-d221f1dde419

提交回复
热议问题