2023-10-27 23:12:16 +02:00
|
|
|
# orcli search
|
|
|
|
|
|
|
|
```
|
2023-10-28 13:53:38 +02:00
|
|
|
orcli search
|
|
|
|
|
|
|
|
apply regex to each column and print matches in flattened tsv format
|
|
|
|
output: index column value
|
2023-10-28 16:23:11 +02:00
|
|
|
note that any exporter supports search by using --facets (see examples)
|
2023-10-27 23:12:16 +02:00
|
|
|
|
|
|
|
Usage:
|
2023-10-28 13:53:38 +02:00
|
|
|
orcli search PROJECT [REGEX] [OPTIONS]
|
2023-10-27 23:12:16 +02:00
|
|
|
orcli search --help | -h
|
|
|
|
|
|
|
|
Options:
|
2023-10-28 13:53:38 +02:00
|
|
|
--index COLUMN
|
|
|
|
print column values instead of row.index in the first column of the output
|
|
|
|
|
2023-10-27 23:12:16 +02:00
|
|
|
--help, -h
|
|
|
|
Show this help
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
PROJECT
|
|
|
|
project name or id
|
|
|
|
|
|
|
|
REGEX
|
2023-10-28 13:53:38 +02:00
|
|
|
search term (regular expression, case-sensitive)
|
2023-10-27 23:12:16 +02:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
orcli search "duplicates" "^Ben"
|
|
|
|
orcli search 1234567890123 "^Ben"
|
2023-10-28 16:23:11 +02:00
|
|
|
orcli search "duplicates" "^F" --index "email"
|
2023-10-28 13:53:38 +02:00
|
|
|
orcli search "duplicates" | column -t -s $' '
|
2023-10-28 16:23:11 +02:00
|
|
|
orcli export tsv "duplicates" --facets '[{ "type": "list", "expression":
|
|
|
|
"grel:filter(row.columnNames,cn,cells[cn].value.find(/^Ben/).length()>0).length()>0",
|
|
|
|
"columnName": "", "selection": [{"v": {"v": true}}] }]'
|
|
|
|
orcli export tsv "duplicates" --facets '[{ "type": "list", "expression":
|
|
|
|
"grel:filter([\"gender\",\"purchase\"],cn,cells[cn].value.find(/^F/).length()>0).length()>0",
|
|
|
|
"columnName": "", "selection": [{"v": {"v": true}}] }]'
|
2023-10-27 23:12:16 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
code: [src/search_command.sh](../src/search_command.sh)
|