'Using Regex to extract decimal numbers from arrays on Snowflake
The column ('DATA') I want to extract the decimal from is in the following format:
{ "unit": "Miles", "value": 59290.6 }
I've tried the following code by I get a null...
regexp_substr(DATA, '\{\d+.\d+\}') AS RECORDED_DISTANCE
Solution 1:[1]
Do you just mean to access the value element?
select
data:value as record_distance
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Aron |
