Skip to content

Conversation

vdelacruzb
Copy link
Contributor

@vdelacruzb vdelacruzb commented Mar 13, 2025

Description

Shortcut

This issue was only detected en BQ. In Snowflake the user is introducing the string version of the points so those values are filtered out in the array creation. In Redshift a Multipoint is added which doesn't have this problem.

It was needed to increase the node version in the yml as some of the packages are not supported by the previous version 14.

Type of change

  • Refactor

Acceptance

Bigquery

SELECT `cartodb-data-engineering-team`.vdelacruz_carto.ST_CLUSTERKMEANS( ARRAY_AGG(geom), 2 ) FROM `cartodb-on-gcp-datascience.dvicente.liverpool_ubicaciones`;
-- Error: No null geometries allowed in input array at UDF$1(ARRAY<STRING>, INT64) line 6, columns 8-9

SELECT `cartodb-data-engineering-team`.vdelacruz_carto.ST_CLUSTERKMEANS( ARRAY_AGG(geom), 2 ) FROM `cartodb-on-gcp-datascience.dvicente.liverpool_ubicaciones`
where geom is not null;
-- Works

@vdelacruzb vdelacruzb requested a review from a team as a code owner March 13, 2025 12:02
Copy link

@diego-vicente diego-vicente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, much more helpful than the current error. Thanks @vdelacruzb!

@vdelacruzb vdelacruzb merged commit 531bbae into main Mar 13, 2025
9 checks passed
@Jesus89 Jesus89 deleted the chore/sc-475711/st-clusterkmeans-and-the-k-means-component branch April 21, 2025 11:04
@Jesus89 Jesus89 mentioned this pull request Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants