-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I'm receiving this error in Snowflake when running my query below:
Error parsing JSON response for external function GET_PLACEKEYS with request batch id: 01bd8b21-0006-09b9-0001-f4fa0564e2d6:1:2:0:0.
Error: "data" JSON array must contain exact number of rows as the request. Response batch expected to have 100 rows, but received 78 rows.
SELECT
CAST(API_RESULT[0] AS INTEGER) AS ID,
CAST(API_RESULT[1] AS VARCHAR) AS PLACEKEY,
CAST(API_RESULT[2] AS VARCHAR) AS ERROR
FROM (
SELECT EXAMPLE_SCHEMA.PUBLIC.GET_PLACEKEYS(object_construct(joined.*)) AS API_RESULT
FROM (
SELECT
CUSTOMER_ID as PRIMARY_KEY,
CAST(ID AS VARCHAR) as LOCATION_NAME,
CONCAT(ADDRESS_1, ' ', ADDRESS_2) as STREET_ADDRESS,
CITY as CITY,
STATE_OR_PROVINCE AS REGION,
POSTAL_CODE AS POSTAL_CODE,
'' AS LATITUDE,
'' AS LONGITUDE,
COUNTRY_CODE AS ISO_COUNTRY_CODE
FROM EXAMPLE_SCHEMA.EXAMPLE_TABLE.CUSTOMER_ADDRESS
) AS joined
) AS RESULT
ORDER BY ID;
Following the README.md I got up to this function and tried to tinker but wanted to see if anyone had any suggestions. Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels