fix output signature

This commit is contained in:
Andy Eschbacher 2016-10-11 16:48:22 -04:00
parent 947d6ba798
commit 3e1cef9958

View File

@ -12,7 +12,7 @@ $$ LANGUAGE plpythonu;
-- query: sql query to retrieve all the needed data -- query: sql query to retrieve all the needed data
CREATE OR REPLACE FUNCTION CDB_KMeansNonspatial(query TEXT, col_names TEXT[], no_clusters INTEGER, id_col TEXT DEFAULT 'cartodb_id') CREATE OR REPLACE FUNCTION CDB_KMeansNonspatial(query TEXT, col_names TEXT[], no_clusters INTEGER, id_col TEXT DEFAULT 'cartodb_id')
RETURNS TABLE(rowid BIGINT, cluster_no INTEGER, ) RETURNS TABLE(cluster_label text, cluster_center text, rowid bigint)
from crankshaft.clustering import kmeans_nonspatial from crankshaft.clustering import kmeans_nonspatial
return kmeans_nonspatial(query, colnames, num_clusters, id_col) return kmeans_nonspatial(query, colnames, num_clusters, id_col)