diff --git a/analyses/call_eudf_address_to_coordinates.sql b/analyses/call_eudf_address_to_coordinates.sql index 5a1d1fd..b7604cf 100644 --- a/analyses/call_eudf_address_to_coordinates.sql +++ b/analyses/call_eudf_address_to_coordinates.sql @@ -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,