Getting grammatical error/invalid error on domo query filters(where clause)
Hi,
I am calling a query on my ddx brick using domo query functions. Now when i try to pass filters which actually are the where clauses in which my where conditons are defined as comma separated. all are with IN operand.
but getting the following error:
"DA0012: A filter was provided to filter the data but it contains a grammatical error or is otherwise invalid and it could not be parsed. The offending filter is: company_id IN (207) . \nThe parsing error is: expression values cannot be parsed at company_id IN (207)"
And my where clause code is as below :
["company_id IN 207",
"facility_ids IN 3631,3632,3633,3634",
"participant_gender IN male"
]
And in the query I am making it as a join as describe in docs as below:
can any one please help me that what is the right format for passing where clauses? because for some columns i have integer values, and for some i have string values and both are comma separated.
Best Answer
-
I just tried those filters in our own system and this is how we are submitting that exact set of filters:
This is the array of data that gets sent over.
[
{ column: 'company_id', operator: 'IN', values: [ '207' ] },
{
column: 'facility_ids',
operator: 'IN',
values: [ '3631', '3632', '3633', '3634' ]
},
{ column: 'participant_gender', operator: 'IN', values: [ 'male' ] }
]
Give that a try^ and let me know if it works for you.
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.** Was this post helpful? Click 💡/💖/👍/😊 below. **
** If it solved your problem. Accept it as a solution! ✔️ **
Or do you need more help? https://calendly.com/matthew-kastner/15-minute-chat
Did I help you out? Feedback is priceless and will help me more than you know.Write a review!0
Answers
-
I think the fix might be very simple where you just need to wrap your options in brackets (particularly these type "[ ]") like so:
["company_id IN [207]",
"facility_ids IN [3631,3632,3633,3634]",
"participant_gender IN ['male']"
]
Please 💡/💖/👍/😊 this post if you read it and found it helpful.Please accept the answer if it solved your problem.
** Was this post helpful? Click 💡/💖/👍/😊 below. **
** If it solved your problem. Accept it as a solution! ✔️ **
Or do you need more help? https://calendly.com/matthew-kastner/15-minute-chat
Did I help you out? Feedback is priceless and will help me more than you know.Write a review!0 -
No @MattTheGuru, still same error!
"DA0012: A filter was provided to filter the data but it contains a grammatical error or is otherwise invalid and it could not be parsed. The offending filter is: company_id IN [207],facility_ids IN [3631,3632,3633,3634],participant_gender IN ['male'] . \nThe parsing error is: expression values cannot be parsed at company_id IN [207],facility_ids IN [3631,3632,3633,3634],participant_gender IN ['male']"
Is there any change that I will do!0 -
I just tried those filters in our own system and this is how we are submitting that exact set of filters:
This is the array of data that gets sent over.
[
{ column: 'company_id', operator: 'IN', values: [ '207' ] },
{
column: 'facility_ids',
operator: 'IN',
values: [ '3631', '3632', '3633', '3634' ]
},
{ column: 'participant_gender', operator: 'IN', values: [ 'male' ] }
]
Give that a try^ and let me know if it works for you.
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.** Was this post helpful? Click 💡/💖/👍/😊 below. **
** If it solved your problem. Accept it as a solution! ✔️ **
Or do you need more help? https://calendly.com/matthew-kastner/15-minute-chat
Did I help you out? Feedback is priceless and will help me more than you know.Write a review!0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive