from pyspark import SparkContext, SQLContext, SparkConf
import os
!curl -o /tmp/ojdbc7.jar https://cernbox.cern.ch/index.php/s/e7NJ5jD3qZB7RNO/download
os.environ['PYSPARK_SUBMIT_ARGS'] = '--jars /tmp/ojdbc7.jar pyspark-shell'
sc = SparkContext()
sqlContext = SQLContext(sc)
before executing the next cell, please replace PWD, SERVER and PORT with password, database host and port respectively
db_df = sqlContext.read.format('jdbc') \
.options(driver='oracle.jdbc.driver.OracleDriver',url='jdbc:oracle:thin:meetup/$PWD@$SERVER:$PORT/PIMT_RAC51.cern.ch',dbtable='meetup_data') \
.load()
db_df.select("EVENT_ID","EVENT_NAME").show(5)