jamiet
jamiet

Reputation: 12264

Can I filter gcloud dataproc clusters list by regular expression?

I'd like to filter the list of clusters returned from gcloud dataproc clusters list by regular expression but I don't think its possible. gcloud topic filters suggests that the ~ operator allows filtering by regular expressions so I tried this:

gcloud dataproc clusters list --region europe-west1 --filter="status.state=RUNNING AND clusterName ~ ${predicate}"

which failed with:

ERROR: (gcloud.dataproc.clusters.list) INVALID_ARGUMENT: Could not parse the filter: ParserException:
errors {
line: 1
column: 38
message: "syntax error"
token: "~"
}

So other than piping the output to grep it looks as though I'm not going to be able to do this. grep is OK, but I'd rather do this in my filter expression.

Can someone confirm that there is no way to filter using regular expressions when using gcloud dataproc clusters list?

Assuming its not possible, is it worth my requesting this functionality and if so, where?

Upvotes: 0

Views: 517

Answers (1)

yyf
yyf

Reputation: 26

Unfortunately, Dataproc does not support regular expression in the cluster filters.

Upvotes: 1

Related Questions