daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Sep 22nd, 2016 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. val rdd = new JdbcRDD[Email](sc,
  2.           () => {DriverManager.getConnection(
  3.  "jdbc:sqlserver://omnimirror;databaseName=moneycorp;integratedSecurity=true;")},
  4.           "SELECT * FROM TABLE_NAME Where ? < X and X < ?",
  5.             1, 100000, 1000,
  6.           (r:ResultSet) => { SomeClass(r.getString("Col1"),
  7.             r.getString("Col2"), r.getString("Col3")) } )
  8.    
  9. c:Appsdistsqoopbin>sqoop.cmd import –connect “jdbc:sqlserver://alexeik0N:1433;database=RelationalDB;user=sa;password=Password" –table SOURCE –target-dir /hive/warehouse/SQLDATA/ –as-textfile –split-by clientid –fields-terminated -by t -m 1
  10.  
  11. loading a hdfs file into spark context
  12. sc.textFile("hdfs://nn1home:8020/input/as.txt")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top