Hello Rick,
I think @Transactional
must be on the testWarehouse()
method to be effective.
Did you try that?
As a different approach, this answer explains how to switch catalog/schema using an interceptor (a.k.a. plugin).
https://stackoverflow.com/a/60789865/1261766
I’m not sure if you can switch the warehouse in the similar manner, but something like this might work.
Object[] args = invocation.getArgs();
Connection con = (Connection) args[0];
SnowflakeConnectionV1 sfCon = con.unwrap(SnowflakeConnectionV1.class);
sfCon.getSfSession().setWarehouse(warehouse);
Interceptor might not be a good fit if you want to change the warehouse only when executing particular statements.
Regards,
Iwao
--
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 mybatis-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mybatis-user/f997a74f-d50d-4077-a209-a7d8d5a66624n%40googlegroups.com.