Add Oracle Jar to Databricks cluster policy

adrianhernandez
Databricks Partner

I created a policy for users to use when they create their own Job clusters. When I'm editing the policy, I don't have the UI options for adding library (I can only see Definitions and Permissions tabs). I need to add via JSON the option to allows the policy to reference the Oracle JAR file (necessary to run JDBC queries). So far, I haven't found the JSON code to do this in a policy. Something like :

"policy_field_name": {
"type": "fixed",
"value": "dbfs:/FileStore/ojdbc.jar"
}

I've researched extensively including Databricks documentation form the Databricks site, posted questions on other forums, etc. So far, have not found an answer to my question.

karthik_p
Databricks Partner

@adrianhernandez are you admin to workspace, if not you might be missing permissions, if you have policies enabled, admin can allow you.

https://docs.databricks.com/en/administration-guide/clusters/policies.html#libraries

if your workspace is Unity catalog enabled, you should follow different approach

karthik.p

I have all the necessary permissions, issue is that not all regions have the new UI options enabled that is why I don't have the Libraries tab when I'm creating a Policy. That is the reason for all of this, I'm forced to use JSON for the policy. I can use the UI for anything else.

Again, I find it odd that Databricks doesn't have an answer in their own documentation, even more so knowing that not everyone will have all the UI options.

I already went thru the page you suggested, again, only shows how to do this thru the UI, there is no JSON code examples.