A bug with TRY_TO_NUMBER() in Snowflake

A bug with TRY_TO_NUMBER() in Snowflake

It’s weird that TRY_TO_NUMBER function isn’t consistent with all alphabets,

Please run the following code,

WITH n AS (

?SELECT 65 AS num

?UNION ALL

?SELECT num + 1

???FROM n

?WHERE num < 122

)

SELECT CHAR(num), TRY_TO_NUMBER(CHAR(num)) FROM n;        

You see it returns 0 when you have ‘E’ or ‘e’.

It seems obviously to be a bug unless ‘E’ or ‘e’ means something special like parsing numbers with scientific notion.

However,

E or e != 0E+0 or 0e+0        

Thanks,

Kyoung Shin

Chief Data Officer at NTERSOL

要查看或添加评论,请登录

Kyoung Shin的更多文章

  • More features by SnowPackage for Snowflake CI/CD

    More features by SnowPackage for Snowflake CI/CD

    Last time, we went through demo with SnowPackage for Snowflake CI/CD at LinkedIn. With this CLI, we can build a…

    8 条评论
  • Demo with SnowPackage for Snowflake CI/CD

    Demo with SnowPackage for Snowflake CI/CD

    Today, I am going to demonstrate NTERSOL's SnowPackage as I introduced at LinkedIn. Here is scenario we will go through…

  • Compilation Time in Snowflake

    Compilation Time in Snowflake

    Two weeks ago, I brought up an issue with cloning a database which has a set of large objects at LinkedIn. I've faced…

    2 条评论
  • Monitoring in Snowflake

    Monitoring in Snowflake

    Snowflake's echo system seems to be rapidly evolving as many tools are available in the current market but none of them…

    2 条评论
  • An event driven single ELT pipeline in Snowflake

    An event driven single ELT pipeline in Snowflake

    We've implemented a single ELT pipeline in Snowflake by creating dynamic sub-tasks on the fly in order to run multiple…

    4 条评论
  • Data Warehouse with a single pipeline in Snowflake

    Data Warehouse with a single pipeline in Snowflake

    In the previous article, I introduced a single ELT pipeline in Snowflake how to ingest thousands of files into…

  • A single ELT pipeline in Snowflake

    A single ELT pipeline in Snowflake

    I've consulted many companies to build data pipelines from their on-prem to Snowflake and observed various tools or…

  • Snowflake CI/CD with State Based Approach

    Snowflake CI/CD with State Based Approach

    There have been many discussion and debate about pros & cons between State based and Migration based database schema &…

    8 条评论
  • Epilogue

    Epilogue

    Through several articles, we've examined possibility to build an uni-bus message pipeline with a complete schema-less…

  • COPY INTO Comparison

    COPY INTO Comparison

    COPY INTO command in Snowflake has very interesting behavior. Today, I am going to demonstrate data ingestion of 10…

    2 条评论

社区洞察

其他会员也浏览了