Sqoop action allows us to include the Sqoop commands as part of the broader Workflow, which can be part of data pipeline. All the parameters that Sqoop needs can be configured via XML arguments.
Open the Sqoop SVG diagram at <BOOK_CODE_HOME>/xsd_svg/sqoop-action-0.4
and see the different properties and elements required for Sqoop action to work.
Check out the following SVG:
Most of the elements required for Sqoop action are similar to the ones we have already seen. The main definition of Sqoop action can be done with one of the two options:
command
arg
An example of the command
option is as follows:
<command>import --connect jdbc:mysql://localhost/database --username sqoop --password sqoop --table tablenameinDB --hive-import --hive-table tablnameinHive</command>
Here's an example of an arg
option:
<arg>import</arg> <arg>--connect</arg> <arg>jdbc:mysql://localhost</arg> <arg>--username</arg <arg>...