-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: internal service to translate predicates to SQL WHERE #356
Labels
Comments
More complex predicates than basic one fails. I haven't tried to figure out exactly when it fails. So it is a somewhat vague issue. But here is an example (I believe it is a valid predicate) {
"type": "and",
"predicates": [
{
"type": "and",
"predicates": [
{
"type": "in",
"key": "COUNTRY",
"values": [
"US",
"UM",
"AS",
"FM",
"GU",
"MH",
"MP",
"PR",
"PW",
"VI"
]
},
{
"type": "not",
"predicate": {
"type": "equals",
"key": "ISSUE",
"value": "COUNTRY_COORDINATE_MISMATCH"
}
}
]
},
{
"type": "and",
"predicates": [
{
"type": "in",
"key": "OCCURRENCE_STATUS",
"values": [
"PRESENT"
]
},
{
"type": "not",
"predicate": {
"type": "in",
"key": "ISSUE",
"values": [
"ZERO_COORDINATE"
]
}
},
{
"type": "not",
"predicate": {
"type": "isNotNull",
"parameter": "GADM_GID"
}
}
]
}
]
} |
MortenHofft
added a commit
to gbif/gbif-web
that referenced
this issue
Feb 4, 2025
MattBlissett
added a commit
to gbif/gbif-predicates
that referenced
this issue
Feb 5, 2025
MattBlissett
added a commit
to gbif/gbif-predicates
that referenced
this issue
Feb 5, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the b3 project we need to create an easy way to generate sql cubes via the UI.
The select and grouping I suppose I would do in a custom service, but it would be nice to reuse the existing predicate => sql code. As far as i understand we already have this code.
In short I would like a service that takes a predicate and returns the WHERE part of an SQL query
The text was updated successfully, but these errors were encountered: