C
C#2mo ago
Auger

Azure Data API Builder - Partial Match

Anyone familiar with the Azure Data API Builder how I can do a partial match filter with a string? There doesn't seem to be a filter operator for a "like". https://learn.microsoft.com/en-us/azure/data-api-builder/rest#filter
9 Replies
Auger
AugerOP2mo ago
For example, I do a filter query param like the following, but this of course does not support a partial match
$"$filter={nameof(User.FirstName)} eq '{name}' or {nameof(User.LastName)} eq '{name}'"
$"$filter={nameof(User.FirstName)} eq '{name}' or {nameof(User.LastName)} eq '{name}'"
Ꜳåąɐȁặⱥᴀᴬ
that's odata, not c# 😒 anyway, there are also azure and power stuff discord servers anyway a google search for "odata like" answers with contains()
Auger
AugerOP2mo ago
I should have mentioned before, but I've tried that. Results in
{
"error": {
"code": "BadRequest",
"message": "$filter query parameter is not well formed.",
"status": 400
}
}
{
"error": {
"code": "BadRequest",
"message": "$filter query parameter is not well formed.",
"status": 400
}
}
No description
Auger
AugerOP2mo ago
From everything I've researched, Data API Builder might just not support it
Ꜳåąɐȁặⱥᴀᴬ
there seem to be too many ' i guess it should be contains(FirstName, 'Auger')
Auger
AugerOP2mo ago
It doesn't appear there is a contains operation for the filter
No description
No description
No description
Ꜳåąɐȁặⱥᴀᴬ
hmmm it should be part of odata 🤔
Auger
AugerOP4w ago
Yeah that's what I read about odata, but the data Api builder doesn't seem to strictly implement all the facets of odata
Ꜳåąɐȁặⱥᴀᴬ
i know it's just inspired from odata, but if there's no contains i don't know if it's possible to architect something like that as strange as it sounds maybe thers's substringof, indexof? or instead of $filter there's a specific parameter for a full text searching query

Did you find this page helpful?