mirror of
https://gitlab.com/cief-data/dbt_cloud.git
synced 2026-08-19 04:14:00 +00:00
geocode function returning more rows than expected, to be fixed.
This commit is contained in:
@@ -6,10 +6,12 @@
|
||||
-- from {{ ref('test_address__mock_data') }};
|
||||
|
||||
-- This block of code returns the latitude, longitude, metadata, every data column
|
||||
-- Fix why this block return 289 rows instead of 17 rows?
|
||||
WITH json_data AS (
|
||||
SELECT PARSE_JSON( {{ address_to_coordinates( 'ADDRESS_LINE_ONE', 'ADDRESS_LINE_TWO', 'POSTCODE', 'DISTRICT_NAME', 'STATE_NAME' ) }} ) AS response
|
||||
from {{ ref('test_address__mock_data') }}
|
||||
)
|
||||
|
||||
SELECT
|
||||
response[0]:geometry:location:lat::float AS LATITUDE,
|
||||
response[0]:geometry:location:lng::float AS LONGITUDE,
|
||||
|
||||
Reference in New Issue
Block a user