admin管理员组文章数量:1122832
I need to transform text from one field to a new one. Currently the TEXTVALUE is "202411219999". The NEWVALUE to obtain must be like this: "2024-11-21"
I managed to use substring("TEXTVALUE", 1, 4) in the expresion function, getting first 4 characters from TEXTVALUE.
Do you know how can I use 3 substrings maybe in one expersion to obtain final "2024-11-21" ? I think palantir is using spark SQL for this.
Thank you
I need to transform text from one field to a new one. Currently the TEXTVALUE is "202411219999". The NEWVALUE to obtain must be like this: "2024-11-21"
I managed to use substring("TEXTVALUE", 1, 4) in the expresion function, getting first 4 characters from TEXTVALUE.
Do you know how can I use 3 substrings maybe in one expersion to obtain final "2024-11-21" ? I think palantir is using spark SQL for this.
Thank you
Share Improve this question asked Nov 21, 2024 at 9:40 TurpanTurpan 5352 gold badges8 silver badges19 bronze badges1 Answer
Reset to default 0you can use concat to concatenate multiple substings,
concat(substring("TEXTVALUE", 1, 4), '-',
substring("TEXTVALUE", 5, 2), '-',
substring("TEXTVALUE", 7, 2))
本文标签: apache spark sqlformating text to a new field in foundry contourStack Overflow
版权声明:本文标题:apache spark sql - formating text to a new field in foundry contour - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736312100a1934976.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论