如何在雪花中找到看不见的角色

发布于 2025-01-18 02:47:30 字数 654 浏览 3 评论 0原文

我正在从数据集中摘取数据集,其中两个列,old_value和new_value应该 不是 相等。但是我得到的虚假行被提出了。

例如:

old_valuenew_value
abcabc

不应获取此行,但它在那里。在弄清楚原因后,它以下显示:

old_valuenew_valuelen(old_value)len(new_value)
abcabc43

我不确定为什么它为old_value显示“ 4”。我确实尝试用空白,新的线角色,regexp_replace替换空白,但没有奏效。

请建议如何查找并删除这个看不见的字符。谢谢你!

I am working on pulling data from a dataset where two columns, old_value and new_value should NOT be equal. But I am getting false rows being fetched.

For Example:

old_valuenew_value
ABCABC

This row should not be fetched but it was there. And upon figuring out why, it showed below:

old_valuenew_valuelen(old_value)len(new_value)
ABCABC43

I am not sure why it showed "4" for old_value. I did try replacing white space with blank, new line character, regexp_replace, but none worked.

Please suggest how to find and remove this invisible character. Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只等公子 2025-01-25 02:47:30

您可以使用正则表达式来删除非 ASCII 字符,

select regexp_replace(old_value, '[^[:ascii:]]', '')

您必须适应您的数据的模式

you can use regular expresiions to remove non ascii charters

select regexp_replace(old_value, '[^[:ascii:]]', '')

the pattern you must adapt to your data

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文