title: PYSPARK: CX_ORACLE.InterfaceError: not a query
body: <p>i need to perform update query in spark job. i am trying below code. but facing issues.</p>
  
  <pre><code>import cx_Oracle
  def query(sql):
      connection = cx_Oracle.connect("username/password@s&lt;url&gt;/db")
      cursor = connection.cursor()
      cursor.execute(sql)
      result = cursor.fetchall()
      return result
  v = [10]
  rdd = sc.parallelize(v).coalesce(1)
  rdd.foreachPartition(lambda x : [query("UPDATE db.tableSET MAPPERS ="+str(i)+" WHERE TABLE_NAME = 'table_name'") for i in x])
  </code></pre>
  
  <p>when i execute the above process i am getting below error.</p>
  
  <pre><code>cx_Oracle.InterfaceError: not a query
  </code></pre>
  
  <p>i tried to update manually using below code.</p>
  
  <pre><code>result = query("&lt;update query&gt;")
  </code></pre>
  
  <p>when i do this, job is executing continuously </p>