Hi Devender, I have always gone with the 2nd approach, only so I don't have to chain a bunch of "option()." calls together. You should be able to use either.
Thanks, Subhash Sent from my iPhone > On Apr 26, 2017, at 3:26 AM, Devender Yadav <devender.ya...@impetus.co.in> > wrote: > > Hi All, > > > I am using Spak 1.6.2 > > > Which is suitable way to create dataframe from RDBMS table. > > DataFrame df = > sqlContext.read().format("jdbc").options(options).load(); > > or > > DataFrame df = sqlContext.read().jdbc(url, table, properties); > > > Regards, > Devender > > > > > > > > NOTE: This message may contain information that is confidential, proprietary, > privileged or otherwise protected by law. The message is intended solely for > the named addressee. If received in error, please destroy and notify the > sender. Any use of this email is prohibited when received in error. Impetus > does not represent, warrant and/or guarantee, that the integrity of this > communication has been maintained nor that the communication is free of > errors, virus, interception or interference.