[Big query] iLike operator is failing when custom check is applied for user role on native query logical model #9779
Replies: 2 comments
-
@praveenweb I don't know who can help here. are all populated operator for custom check supported in context of big query? 'eq ' operator working fine when I apply permission check on fields which are created using logical data model. But other operator like ilike, in, regex etc are not working. I want to use in operator, I know big query does not support array, is any alternative operator which can help to do the same. I tried to convert array to string then match pattern, but like, regex all are failing in context of big query. Please suggest. |
Beta Was this translation helpful? Give feedback.
-
I have the same issue. I am using |
Beta Was this translation helpful? Give feedback.
-
@SamirTalwar
I am using hasura cloud version: v2.29.1-cloud.1. Created native query on Big query table. Tried to create validator for user role. eq operator is working fine but some of another operator is failing Like iLike.
This is request
{ "type": "bulk", "args": [ { "type": "bigquery_drop_logical_model_select_permission", "args": { "permission": {}, "name": "group_by_city_fields", "role": "user", "source": "xxxx-production_analytics" } }, { "type": "bigquery_create_logical_model_select_permission", "args": { "name": "group_by_city_fields", "role": "user", "permission": { "filter": { "brand": { "_ilike": "x-hasura-selected-xxxx" } }, "columns": [ "brand", "region_name", "sub_region_name" ] }, "source": "xxxx-production_analytics" } } ], "resource_version": 151 }
Response:
{ "error": "cannot continue due to new inconsistent metadata", "path": "$.args[1].args", "code": "unexpected", "internal": [ { "definition": { "comment": null, "name": "group_by_city_fields", "permission": { "allow_aggregations": false, "columns": [ "brand", "region_name", "sub_region_name" ], "computed_fields": [], "filter": { "brand": { "_ilike": "x-hasura-selected-xxxx" } } }, "role": "user", "source": "xxxx-production_analytics" }, "name": "select_permission user in logical_model group_by_city_fields in source xxxx-production_analytics", "reason": "Inconsistent object: in logical model \"group_by_city_fields\": in permission for role \"user\": Unknown operator: _ilike", "type": "select_permission" } ] }
Attached screenshot
Beta Was this translation helpful? Give feedback.
All reactions