From 5f98735ce97bb040d1233252e2fce40a175de728 Mon Sep 17 00:00:00 2001 From: Stuart Lynn Date: Tue, 28 Jun 2016 16:04:23 +0000 Subject: [PATCH] adding documentation for pyagg helper --- doc/04_pyAgg.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/04_pyAgg.md diff --git a/doc/04_pyAgg.md b/doc/04_pyAgg.md new file mode 100644 index 0000000..95aded9 --- /dev/null +++ b/doc/04_pyAgg.md @@ -0,0 +1,23 @@ +## PyAgg Helper Function + +### CDB_pyAgg (columns Numeric[]) + +Currently it's not possible to pass a multidiemensional array between plpsql and plpythonu. This function aims to +help fix that by aggergating the columns provided in the argument across rows in to a rows * columns + 1 length 1D array. The first element of the array is the array\_length of the columns argument so that python can reconstruct +the 2D array. + +#### Arguments + +| Name | Type | Description | +|------|------|-------------| +| columns | NUMERIC[] | The columns to aggregate across rows| + +#### Returns + +A table with the following columns. + +| Column Name | Type | Description | +|-------------|------|-------------| +| result | NUMERIC[] | An columns * rows + 1 array where the first entry is the no of columns| + +