Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  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")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement