JDBC connection using spark
val jdbcDF = spark.read .format("jdbc") .option("url", "connectionString") .option("dbtable", "schema.tablename") .option("user", "username") .option("password", "password") .load()
ConnectionString has to be changes based on the database which we want to connect too
jdbcDF is the resultant dataframe which holds data from RDBMS system.
Comments
Post a Comment