title: Spark read jdbc db2 with ur command
body: <p>I am trying to extract data from Db2 to spark using read.jdbc . i am unable to pass with UR string in the query.</p>
  <p>How do we set isolation as UR in the spark jdbc read.</p>
  <pre><code>import json
  #spark = SparkSession.builder.config('spark.driver.extraClassPath', '/home/user/db2jcc4.jar').getOrCreate()
  jdbcUrl = &quot;jdbc:db2://{0}:{1}/{2}&quot;.format(&quot;db2.1234.abcd.com&quot;, &quot;3910&quot;, &quot;DSN&quot;)
  connectionProperties = {
    &quot;user&quot; : &quot;user1&quot;,
    &quot;password&quot; : &quot;password1&quot;,
    &quot;driver&quot; : &quot;com.ibm.db2.jcc.DB2Driver&quot;,
    &quot;fetchsize&quot; : &quot;100000&quot;
  }
  pushdown_query = &quot;(SELECT T6.COLUMN1, T6.COLUMN2 ,TO_DATE('07/11/2019 10:52:24', 'MM/DD/YYYY HH24:MI:SS') AS INSERT_DATE FROM DB1.T6 WITH UR ) ALIAS&quot;
  print(jdbcUrl)
  df = spark.read.jdbc(url=jdbcUrl, table=pushdown_query, column=&quot;COLUMN1&quot;, lowerBound=1, upperBound=12732076, numPartitions=5, properties=connectionProperties)
  </code></pre>
  <p>This is failing with error : com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-199, SQLSTATE=42601, SQLERRMC=UR;;FETCH , ) OFFSET LIMIT INTERSECT ORDER GROUP WHERE HAVING JOIN, DRIVER=4.13.80</p>
  <p>if i remove the UR it is working. Is there a way to pass query with UR in spark jdbc read?</p>
  <p>There is connection parameter in jdbc but this is mentioned only applied to writing
  isolationLevel  The transaction isolation level, which applies to current connection. It can be one of NONE, READ_COMMITTED, READ_UNCOMMITTED, REPEATABLE_READ, or SERIALIZABLE, corresponding to standard transaction isolation levels defined by JDBC's Connection object, with default of READ_UNCOMMITTED. This option applies only to writing. Please refer the documentation in java.sql.Connection.</p>
  <p>will  the below do the trick ?</p>
  <pre><code>connectionProperties = {
        &quot;user&quot; : &quot;user1&quot;,
        &quot;password&quot; : &quot;password1&quot;,
        &quot;driver&quot; : &quot;com.ibm.db2.jcc.DB2Driver&quot;,
        &quot;fetchsize&quot; : &quot;100000&quot;,
  &quot;isolationLevel&quot; : &quot;READ_UNCOMMITTED&quot; 
      }
  </code></pre>