0

I have a large BigQuery table that has 50-100 columns. I would like a query to count how many of those column names start with the string "a_" and how many start with "e_".

1 Answer 1

2

One way to do it is by using bq CLI tool:

bq --format=prettyjson show dataset.table | grep '"name": "a_' | wc -l

bq --format=prettyjson show dataset.table | grep '"name": "e_' | wc -l

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.