Database Reference
In-Depth Information
Example Code
Our movie review dataset is in a table in a PostgreSQL database, and we want to import it in-
to a text file in Hadoop (it is also possible to move data from Hadoop to an RDBMS, but this
is not illustrated here):
myschema=> select * from moviereviews
reviewer | title | score
----------+----------------+-------
Kevin | Dune | 10
Kevin | Casablanca | 5
Bob | Blazing Saddles| 9
Marshall | Dune | 1
sqoop import --connect jdbc:postgresql://<host>/<database> \
--table moviereviews --username JoeUser --P
<lots of lines omitted>
hadoop fs -cat moviereviews/part-m-00000
Kevin,Dune,10
Kevin,Casablanca,5
Bob, Blazing Saddles,9
Marshall,Dune,1
Flume
License
Apache License, Version 2.0
Activity
Medium
Purpose
Data collection and aggregation, especially for log data
 
Search WWH ::




Custom Search