Sqoop tutorial 6 : Importing Only a Subset of Data
Use the command-line parameter --where to specify a SQL condition that the imported data should meet.
For example, to import only USA cities from the table cities, you
can issue the following Sqoop command:
sqoop import \
--connect jdbc:mysql://mysql.example.com/sqoop \
--username sqoop \
--password sqoop \
--table cities \
--where "country = 'USA'"
For example, to import only USA cities from the table cities, you
can issue the following Sqoop command:
sqoop import \
--connect jdbc:mysql://mysql.example.com/sqoop \
--username sqoop \
--password sqoop \
--table cities \
--where "country = 'USA'"
Comments
Post a Comment