Hello everyone,
I need to take a row of a Table to an array. For example:
Col1 | Col2 | |
Row1 | 1 | 2 |
Row2 | 3 | 4 |
By indexRow
table[2] --> [3, 4]
Or by RowHeader:
table["Row2"] -- > [3,4]
I know I can obtain the array of a column doing:
Table.query("SELECT ARRAY_AGG([Col2]) FROM table")
However, in SQL the WHERE statement is only for Column. I don't know how to call the RowHeader as a column as:
Table.query("SELECT * FROM table WHERE Row = 2)
Or by RowHeader:
Table.query("SELECT * FROM table WHERE RowHeader = "Col2")
How can we obtain the row into an array? I tought to make a for loop to obtain all values into an array, but maybe SQL statement will be optimal.
Thank you!:D