# Enhancement Request - ARP JDBC

**URL:** <https://community.dremio.com/t/enhancement-request-arp-jdbc/4449>\
**Category:** Uncategorized\
**Created:** [October 29, 2019, 6:59pm UTC](https://community.dremio.com/t/enhancement-request-arp-jdbc/4449 "2019-10-29T18:59:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![patricker](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/patricker/32/1823_2.png) [@patricker](https://community.dremio.com/u/patricker)\
**Post date:** [October 29, 2019, 6:59pm UTC](https://community.dremio.com/t/enhancement-request-arp-jdbc/4449/1 "2019-10-29T18:59:09Z")

</div>

We’ve had a lot of success using the ARP JDBC plugin framework.

We’d like to be able to make pre/post SQL calls whenever a connection is retrieved/returned to the connection pool; if we had to override `JdbcConf.newPlugin` and provide an extended version of `JdbcStoragePlugin` that would be fine. We’d also like to have access to the querying user at this scope, so we could set session parameters on the database. These querying user details are outside the scope of dataset security, that we could achieve with `checkAccess`.

In practice I think this would mean `JdbcRecordReader` would need the username, and during `setup` it could pass us a copy along with the `connection` object already pulled from the pool, and again on `cancel`/`close` for cleanup.

---

<div class="post-metadata">

**Author:** ![tfry](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@tfry](https://community.dremio.com/u/tfry)\
**Post date:** [October 31, 2019, 5:25pm UTC](https://community.dremio.com/t/enhancement-request-arp-jdbc/4449/2 "2019-10-31T17:25:43Z")

</div>

Thanks for the comment and request. Adding the ability to specify SQL to run before/after queries is something we have looked at but do not have a timeframe on at this time. Out of curiosity, would the pre SQL calls that set session parameters based on the username change the structure of tables returned in your case? For example would different users see different columns masked at the source level after the per user session parameters were set? Thanks, Tom

---

<div class="post-metadata">

**Author:** ![patricker](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/patricker/32/1823_2.png) [@patricker](https://community.dremio.com/u/patricker)\
**Post date:** [October 31, 2019, 8:01pm UTC](https://community.dremio.com/t/enhancement-request-arp-jdbc/4449/3 "2019-10-31T20:01:52Z")

</div>

It does not change the schema of the result set. We use it to execute internal row level security.

I would be happy to make the change myself, and even run a customized version, except it’s my understanding that the license associated with this library does not allow me to do that.

It would be great to see this wrapper library also put up on the Hub and have it’s licensed changed to Apache 😃

---

<div class="post-metadata">

**Author:** ![Bruce\_Lowther](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/bruce_lowther/32/1453_2.png) [@Bruce\_Lowther](https://community.dremio.com/u/Bruce_Lowther)\
**Post date:** [November 5, 2019, 4:26pm UTC](https://community.dremio.com/t/enhancement-request-arp-jdbc/4449/4 "2019-11-05T16:26:44Z")

</div>

we have similar desire for this.  
as well as an adjustment to the license.
