Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Reorder the columns in a table according to specified column labels. This operator is useful if you have a table with numerous columns and want to reorder some of them. One of the columns can be "*", which represents all columns in the table except the ones that are listed as arguments.

Operator usage in easy mode

  1. Click + on the parent node.

  2. Enter Select operator in the search field and select the operator from the Results to open the operator form.

  3. In the Input Table drop-down, select the input table.

  4. In the Columns drop-down, enter or select a column.

  5. Click Run to view the result.

  6. Click Cancel to discard the operator form.

  7. Click Submit to add the operator to the playbook.

Usage details

LQL Command

select(tablename, columns)
-- tablename: name of table to apply an operator
-- columns: list of columns e.g. select(table, col1, col2, col3 ...)

-- NOTE: one of the columns can be "*" which represents all columns in the table EXCEP the one those are listed in the args

Example

Input

col1

col2

col3

col4

col5

col6

1

2

3

4

5

6

LQL command

select(inputTable, "col2", "col6")
-- should produce table(col2, col6)

select(inputTable, "col2", "col6", "*")
-- should produce table(col2, col6, col1, col3, col4, col5)

select(inputTable, "*", "col2", "col6")
-- should produce table(col1, col3, col4, col5, col2, col6)

select(inputTable, "col2", "*", "col6")
-- should produce table(col2, col1, col3, col4, col5, col6)

select(inputTable, "col2 as newcol1", "*", "col6 as newcol2")
-- should produce table(newcol1, col1, col3, col4, col5, newcol2)

  • No labels