I'm attempting to set up a logs-based alert in GCP Log Explorer to monitor a table that receives new records daily. Occasionally, the number of records is low, sometimes below 1000. In such cases, I'd need to manually trigger the pipeline again when more data is available. I've tested the query below multiple times, but it doesn't seem to return the expected log results. In fact, it doesn't return any logs at all, even though there are logs indicating that fewer than 1000 records were inserted on certain days. I suspect the issue might lie in my syntax, particularly in line 6, but I haven't found any documentation addressing this specific concern.
resource.type="bigquery_dataset"
resource.labels.dataset_id="friend"
protoPayload.resourceName="projects/firebasereiss/datasets/friend/tables/clickbait"
protoPayload.authenticationInfo.principalEmail:"[email protected]"
protoPayload.methodName:"google.cloud.bigquery.v2.JobService.InsertJob"
protoPayload.metadata.tableDataChange.insertedRowsCount < 1000