Manipulate (Mask/Unmask) data in GUI and sql query snowflake-JDBC

I have to manipulate retrieved data in metabase client side for snowflake connection. The use case is to mask/unmask data in client side (ie metabase) . As for POC I tried to override getString() and getObject() in SnowflakeResultset class . It worked for using resultset in Java

while (resultset.next()) {
System.out.println(resultset.getString(1)) ;  //shows the manipulated data
}

Unfortunately the customised snowflake-jdbc.jar and snowflake.metabase-jdbc.jar in Metabse GUI and SQL it's not showing the manipulated instead showing the original.

Anywhere I'm missing or where can I override in order to manipulate simple select query !!

Hi @siva_raj
Masking is applied to the role, so perhaps you're connecting with different roles in your test and Metabase.
https://docs.snowflake.com/en/user-guide/security-column-ddm-use.html

@flamber , Thanks for the update
My concern is to mask/unmask in metabase (i.e client side) that's why im overriding the snowflake.metabase-jdbc.jar

@siva_raj Okay, so you just want to manipulate data in Metabase in general, not really specific to any driver? Then you should look at the query processor: https://github.com/metabase/metabase/tree/master/src/metabase/query_processor

yeah need to manipulate in metabase but only to snowflake , that's why made a customised snowflake.metabase-jdbc driver jar

@siva_raj Yes, figure out how to do it generally, then you can include the same code in the driver, which then overrides the default.

@flamber yeah , I found and it's working for java client as mentioned in the question .
It's not working in Metabase GUI and Sql output in UI .