Exposing and saving the Query Validity in the query object #1000
A-EbrahimRSA
started this conversation in
Ideas
Replies: 1 comment 6 replies
-
|
Sorry it took me so long to respond to this. Have a look at this PR: It adds a "validation" export format that augments a copy of the query object with per-rule and per-group validation results. Does that address your requirement? |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am wondering the value add and complexity of having the query validity exposed on the query object itself at a high level/on a per rule basis similar to how
disabled&mutedare currently handled.. I would like to run some external API calls and logic but only when the query itself is valid.I would like to try and ensure on the client-side, as far as I can, that the query is first syntactically valid(using the built in validators). Thereafter I can semantically/contextually check its validity in the backend afterwards. Being able to see the query validity would enable be to "watch" this with a
useEffectand fire API calls accordingly.To provide some further context, I did try using the
defaultValidator(query)as a rough means to test for validity however, this is not a very foolproof solution.I have found some more success in using
formatQuery(query, { format: 'sql', fallbackExpression: 'Failed' }).Essentially, I am taking advantage of the fact that the
formatQuerymethod has some type of internal query validity checks and I am using this to check for the query validity. If this could be exposed as a callable method, that would be great.Beta Was this translation helpful? Give feedback.
All reactions