From Hive
If the source link of a job is a Hive link, configure the source job parameters based on Table 1.
Category |
Parameter |
Description |
Example Value |
---|---|---|---|
Basic parameters |
Database Name |
Database name. Click the icon next to the text box. The dialog box for selecting the database is displayed. |
default |
Table Name |
Hive table name. Click the icon next to the text box. The dialog box for selecting the table is displayed. This parameter can be configured as a macro variable of date and time and a path name can contain multiple macro variables. When the macro variable of date and time works with a scheduled job, the incremental data can be synchronized periodically. For details, see Incremental Synchronization Using the Macro Variables of Date and Time.
NOTE:
If you have configured a macro variable of date and time and schedule a CDM job through DataArts Studio DataArts Factory, the system replaces the macro variable of date and time with (Planned start time of the data development job – Offset) rather than (Actual start time of the CDM job – Offset). |
TBL_E |
|
Read Mode |
Two read modes are available: HDFS and JDBC. By default, the HDFS mode is used. If you do not need to use the WHERE condition to filter data or add new fields on the field mapping page, select the HDFS mode.
|
HDFS |
|
Use SQL Statement |
Whether you can use SQL statements to export data from a relational database |
No |
|
SQL Statement |
When Use SQL Statement is set to Yes, enter an SQL statement here. CDM exports data based on the SQL statement.
NOTE:
|
select id,name from sqoop.user; |
|
Advanced attributes |
Partition Values |
This parameter is displayed when you select the HDFS read mode and click Show Advanced Attributes. This parameter indicates extracting the partition of a specified value. The attribute name is the partition name. You can configure multiple values (separated by spaces) or a field value range. The time macro function is supported. For details, see Incremental Synchronization Using the Macro Variables of Date and Time.
NOTE:
If you have configured a macro variable of date and time and schedule a CDM job through DataArts Studio DataArts Factory, the system replaces the macro variable of date and time with (Planned start time of the data development job – Offset) rather than (Actual start time of the CDM job – Offset). |
|
WHERE Clause |
This parameter is displayed when you select the JDBC read mode and click Show Advanced Attributes. This parameter indicates the WHERE clause to be extracted. If this parameter is not set, the entire table is extracted. If the table to be migrated does not contain the fields specified by the WHERE clause, the migration will fail. You can set a date macro variable to extract data generated on a specific date. For details, see Incremental Migration of Relational Databases.
NOTE:
If you have configured a macro variable of date and time and schedule a CDM job through DataArts Studio DataArts Factory, the system replaces the macro variable of date and time with (Planned start time of the data development job – Offset) rather than (Actual start time of the CDM job – Offset). |
age > 18 and age <= 60 |
If the data source is Hive, CDM will automatically partition data using the Hive data partitioning file.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot