How to get access to generated query before it actually is executed?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get access to generated query before it actually is executed?

Rick R
We have this odd situation using Yellowbrick data warehouse where if the query is over a certain length it is failing. (It's pretty complex dynamic SQL that gets generated.) Until we hear back from Yellowbrick support on why we are bumping into this limit, I'd like to abort even trying to run the query if the query that is to run ends up over a certain length, but I'm not sure how to get access to the underlying query that will end up running. Any help would be appreciated.
  
--
Rick R

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CA%2BY-7Y4a8tj7GcVT9fXP%3DW114mUJr-%2BojmMsLmUj-L-DPZ_s7w%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: How to get access to generated query before it actually is executed?

Jeff Butler
This is an interceptor I wrote years ago that logs the generated SQL. It could be modified to abort a query.


Jeff Butler


On Thu, Jan 28, 2021 at 4:38 PM Rick R <[hidden email]> wrote:
We have this odd situation using Yellowbrick data warehouse where if the query is over a certain length it is failing. (It's pretty complex dynamic SQL that gets generated.) Until we hear back from Yellowbrick support on why we are bumping into this limit, I'd like to abort even trying to run the query if the query that is to run ends up over a certain length, but I'm not sure how to get access to the underlying query that will end up running. Any help would be appreciated.
  
--
Rick R

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CA%2BY-7Y4a8tj7GcVT9fXP%3DW114mUJr-%2BojmMsLmUj-L-DPZ_s7w%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CAKpaNj4FedYRasM0RV3s0n5BM98tZQBGWhqaE%2BS386OeNf81bw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: How to get access to generated query before it actually is executed?

Rick R
Very cool Jeff!
Thanks

On Thu, Jan 28, 2021 at 4:47 PM Jeff Butler <[hidden email]> wrote:
This is an interceptor I wrote years ago that logs the generated SQL. It could be modified to abort a query.


Jeff Butler


On Thu, Jan 28, 2021 at 4:38 PM Rick R <[hidden email]> wrote:
We have this odd situation using Yellowbrick data warehouse where if the query is over a certain length it is failing. (It's pretty complex dynamic SQL that gets generated.) Until we hear back from Yellowbrick support on why we are bumping into this limit, I'd like to abort even trying to run the query if the query that is to run ends up over a certain length, but I'm not sure how to get access to the underlying query that will end up running. Any help would be appreciated.
  
--
Rick R

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CA%2BY-7Y4a8tj7GcVT9fXP%3DW114mUJr-%2BojmMsLmUj-L-DPZ_s7w%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CAKpaNj4FedYRasM0RV3s0n5BM98tZQBGWhqaE%2BS386OeNf81bw%40mail.gmail.com.


--
Rick R

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CA%2BY-7Y4sYrTf%2BumR3SFXHTnqvHmTRgeHj7NqpMaNh8TTXCg7oQ%40mail.gmail.com.