-1

I want add a command to add my grant statement so i can provide Select access to users to the table i have loaded using pyspark.

  df.write.format("jdbc")
    .option("url", "jdbc:db2:@//<host>:<port>/<srvice_name") \
    .option("user", "<user>") \
    .option("password", "<pass>") \
    .option("dbtable", db_query) \
    .option("driver", "com.ibm.db2.jcc.DB2Driver")
  • Your subject-line and keywords mention Db2, but you show only Oracle url and Oracke driver. EDIT your question to fix that. – mao Dec 18 '19 at 09:27

1 Answers1

1

I assume you're looking for options within pyspark. Don't know if it's possible using pyspark. You can do it using other database access methods like SQL Alchemy.

How to grant access privileges to DB2 table using SQLAlchemy in a jupyter notebook