mirror of
https://github.com/CartoDB/crankshaft.git
synced 2024-11-01 10:20:48 +08:00
adding documentation for pyagg helper
This commit is contained in:
parent
7d6148456e
commit
5f98735ce9
23
doc/04_pyAgg.md
Normal file
23
doc/04_pyAgg.md
Normal file
@ -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|
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user