Getting error while using field filter for bigquery

I'm trying to apply a field filter to select multiple values from the dropdown, but every time getting below error -
400 Bad Request POST https://www.googleapis.com/bigquery/v2/projects/epic-jenkins/queries { "code" : 400, "errors" : [ { "domain" : "global", "location" : "q", "locationType" : "parameter", "message" : "Unrecognized name: epic.publisher at [14:11]", "reason" : "invalidQuery" } ], "message" : "Unrecognized name: epic.publisher at [14:11]", "status" : "INVALID_ARGUMENT" }

Can someone please help?

please post diagnostic info

Hi @Luiggi ,

I had aliases in my query, when I removed and selected from one table it worked fine.
But what would be the workaround for complex query?

@Luiggi
here is the diagnostic info -
{
"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.18+10",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.18",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.18+10",
"os.name": "Linux",
"os.version": "5.10.0-21-cloud-amd64",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"bigquery-cloud-sdk",
"h2"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "15.2 (Debian 15.2-1.pgdg110+1)"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.5.0"
}
},
"run-mode": "prod",
"version": {
"date": "2023-02-19",
"tag": "v0.45.3",
"branch": "release-x.45.x",
"hash": "070f57b"
},
"settings": {
"report-timezone": null
}
}
}

@Luiggi
here is the example query -
SELECT
payment_group.name AS name,
payment_group.rev_type as rev_type,
payment_group.id as publisher_id,
FROM epic.publisher
LEFT JOIN epic.publisher AS payment_group ON publisher.payment_group = payment_group.id
where {{publisher.name}}

Whenever I'm selecting anything values from the dropdown getting the below error -

400 Bad Request POST https://www.googleapis.com/bigquery/v2/projects/epic-jenkins/queries { "code" : 400, "errors" : [ { "domain" : "global", "location" : "q", "locationType" : "parameter", "message" : "Syntax error: Expected end of input but got keyword WHERE at [2:1]", "reason" : "invalidQuery" } ], "message" : "Syntax error: Expected end of input but got keyword WHERE at [2:1]", "status" : "INVALID_ARGUMENT" }

Can you please help?

So you’re doing a join to the same table and want to use a field filter, is that correct? Can you try not using a dot in the field filter name?

Somehow I managed to resolve this issue. I had to use backtick with the table and remove the dot from the filed filter.

Thank You!

Hello Unnatijais,
I have the same issue with you, please help to share me your solution :frowning:

400 Bad Request POST https://bigquery.googleapis.com/bigquery/v2/projects/gcp-gfb-sai-tracking-gold/queries { "code": 400, "errors": [ { "domain": "global", "location": "q", "locationType": "parameter", "message": "Unrecognized name: applaydu.tbl_date_filter at [2:96]", "reason": "invalidQuery" } ], "message": "Unrecognized name: applaydu.tbl_date_filter at [2:96]", "status": "INVALID_ARGUMENT" }

Thank you very much!
Tuan.