Function |
tHiveInput is the dedicated component to the Hive database (the Hive data warehouse system). It can execute a given HiveQL query in order to extract the data from Hive. | |
Purpose |
tHiveInput extracts data from Hive and sends the data to the component that follows. |
Component family |
Big Data / Hive | |
Basic settings |
Property type |
Either Built-In or Repository. Built-In: No property data stored centrally. Repository: Select the repository file where the properties are stored. |
|
Use an existing connection |
Select this check box and in the Component List click the relevant connection component to reuse the connection details you already defined. NoteWhen a Job contains the parent Job and the child Job, if you need to share an existing connection between the two levels, for example, to share the connection created by the parent Job with the child Job, you have to:
For an example about how to share a database connection across Job levels, see Talend Studio User Guide. |
Version |
Distribution |
Select the cluster you are using from the drop-down list. The options in the list vary depending on the component you are using. Among these options, the following ones requires specific configuration:
In order to connect to a custom distribution, once selecting Custom, click the
|
|
Hive version |
Select the version of the Hadoop distribution you are using. The available options vary depending on the component you are using. Along with the evolution of Hadoop, please note the following changes:
|
|
Connection mode |
Select a connection mode from the list. The options vary depending on the distribution you are using. |
Hive server |
Select the Hive server through which you want the Job using this component to execute queries on Hive. This Hive server list is available only when the Hadoop distribution to be used such as HortonWorks Data Platform V1.2.0 (Bimota) supports HiveServer2. It allows you to select HiveServer2 (Hive 2), the server that better support concurrent connections of multiple clients than HiveServer (Hive 1). For further information about HiveServer2, see https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2. | |
|
Host |
Database server IP address. |
|
Port |
Listening port number of DB server. |
|
Database |
Fill this field with the name of the database. NoteThis field is not available when you select Embedded from the Connection mode list. |
|
Username and Password |
DB user authentication data. To enter the password, click the [...] button next to the password field, and then in the pop-up dialog box enter the password between double quotes and click OK to save the settings. |
Authentication |
Use kerberos authentication |
If you are accessing a Hive Metastore running with Kerberos security, select this check box and then enter the relevant parameters in the fields that appear.
The values of the following parameters can be found in the hive-site.xml file of the Hive system to be used.
For the other parameters that are displayed, please consult the Hadoop configuration files they belong to. For example, the Namenode principal can be found in the hdfs-site.xml file or the hdfs-default.xml file of the distribution you are using. This check box is available depending on the Hadoop distribution you are connecting to. |
Use a keytab to authenticate |
Select the Use a keytab to authenticate check box to log into a Kerberos-enabled Hadoop system using a given keytab file. A keytab file contains pairs of Kerberos principals and encrypted keys. You need to enter the principal to be used in the Principal field and the access path to the keytab file itself in the Keytab field. Note that the user that executes a keytab-enabled Job is not necessarily the one a principal designates but must have the right to read the keytab file being used. For example, the user name you are using to execute a Job is user1 and the principal to be used is guest; in this situation, ensure that user1 has the right to read the keytab file to be used. | |
Use SSL encryption |
Select this check box to enable the SSL or TLS encrypted connection. Then in the fields that are displayed, provide the authentication information:
This feature is available only to the HiveServer2 in the Standalone mode of the following distributions:
| |
Hadoop properties |
Set Jobtracker URI |
Select this check box to indicate the location of the Jobtracker service within the Hadoop cluster to be used. For example, we assume that you have chosen a machine called machine1 as the JobTracker, then set its location as machine1:portnumber. A Jobtracker is the service that assigns Map/Reduce tasks to specific nodes in a Hadoop cluster. Note that the notion job in this term JobTracker does not designate a Talend Job, but rather a Hadoop job described as MR or MapReduce job in Apache's Hadoop documentation on http://hadoop.apache.org. This property is required when the query you want to use is executed in Windows and it is
a If you use YARN in your Hadoop cluster such as Hortonworks Data Platform V2.0.0 or Cloudera CDH4.3 + (YARN mode), you need to specify the location of the Resource Manager instead of the Jobtracker. Then you can continue to set the following parameters depending on the configuration of the Hadoop cluster to be used (if you leave the check box of a parameter clear, then at runtime, the configuration about this parameter in the Hadoop cluster to be used will be ignored ):
For further information about these parameters, see the documentation or contact the administrator of the Hadoop cluster to be used. For further information about the Hadoop Map/Reduce framework, see the Map/Reduce tutorial in Apache's Hadoop documentation on http://hadoop.apache.org. |
Set NameNode URI |
Select this check box to indicate the location of the NameNode of the Hadoop cluster to be used. The NameNode is the master node of a Hadoop cluster. For example, we assume that you have chosen a machine called masternode as the NameNode of an Apache Hadoop distribution, then the location is hdfs://masternode:portnumber. This property is required when the query you want to use is executed in Windows and it is
a For further information about the Hadoop Map/Reduce framework, see the Map/Reduce tutorial in Apache's Hadoop documentation on http://hadoop.apache.org. | |
Microsoft HD Insight properties |
WebHCat configuration |
Enter the address and the authentication information of the WebHCat service of the Microsoft HD Insight cluster to be used. The Studio uses this service to submit the Job to the HD Insight cluster. In the Job result folder field, enter the location in which you want to store the execution result of a Job in the Azure Storage to be used. |
HDInsight configuration |
Enter the authentication information of the HD Insight cluster to be used. | |
Windows Azure Storage configuration |
Enter the address and the authentication information of the Azure Storage account to be used. In the Container field, enter the name of the container to be used. In the Deployment Blob field, enter the location in which you want to store the current Job and its dependent libraries in this Azure Storage account. | |
|
Schema and Edit Schema |
A schema is a row description. It defines the number of fields (columns) to be processed and passed on to the next component. The schema is either Built-In or stored remotely in the Repository. Click Edit schema to make changes to the schema. If the current schema is of the Repository type, three options are available:
|
|
|
Built-in: The schema is created and stored locally for this component only. Related topic: see Talend Studio User Guide. |
|
|
Repository: The schema already exists and is stored in the Repository, hence can be reused. Related topic: see Talend Studio User Guide. |
|
Table Name |
Name of the table to be processed. |
|
Query type |
Either Built-in or Repository. |
|
|
Built-in: Fill in manually the query statement or build it graphically using SQLBuilder |
|
|
Repository: Select the relevant query stored in the Repository. The Query field gets accordingly filled in. |
|
Guess Query |
Click the Guess Query button to generate the query which corresponds to your table schema in the Query field. |
Guess schema |
Click this button to retrieve the schema from the table. | |
This query uses Parquet objects |
When available, select this check box to indicate that the table to be handled uses the Parquet format and thus make the component to call the required jar file. Note that when the file format to be used is PARQUET, you might be prompted to find the specific Parquet jar file and install it into the Studio.
This jar file can be downloaded from Apache's site. For further information about how to install an external jar file, see the article Installing external modules on Talend Help Center (https://help.talend.com). | |
|
Query |
Enter your DB query paying particularly attention to properly sequence the fields in order to match the schema definition. For further information about the Hive query language, see https://cwiki.apache.org/confluence/display/Hive/LanguageManual. NoteCompressed data in the form of Gzip or Bzip2 can be processed through the query statements. For details, see https://cwiki.apache.org/confluence/display/Hive/CompressedStorage. Hadoop provides different compression formats that help reduce the space needed for storing files and speed up data transfer. When reading a compressed file, the Studio needs to uncompress it before being able to feed it to the input flow. |
Execution engine |
Select this check box and from the drop-down list, select the framework you need to use to run the Job. This list is available only when you are using the Embedded mode for the Hive connection and the distribution you are working with is among the following ones:
Before using Tez, ensure that the Hadoop cluster you are using supports Tez. You will need to configure the access to the relevant Tez libraries via the Advanced settings view of this component. For further information about Hive on Tez, see Apache's related documentation in https://cwiki.apache.org/confluence/display/Hive/Hive+on+Tez. Some examples are presented there to show how Tez can be used to gain performance over MapReduce. | |
HBase Configuration NoteAvailable only when the Use an existing connection check box is clear |
Store by HBase |
Select this check box to display the parameters to be set to allow the Hive components to access HBase tables:
For further information about this access involving Hive and HBase, see Apache's Hive documentation about Hive/HBase integration. |
Zookeeper quorum |
Type in the name or the URL of the Zookeeper service you use to coordinate the transaction between your Studio and your database. Note that when you configure the Zookeeper, you might need to explicitly set the zookeeper.znode.parent property to define the path to the root znode that contains all the znodes created and used by your database; then select the Set Zookeeper znode parent check box to define this property. | |
Zookeeper client port |
Type in the number of the client listening port of the Zookeeper service you are using. | |
Define the jars to register for HBase |
Select this check box to display the Register jar for HBase table, in which you can register any missing jar file required by HBase, for example, the Hive Storage Handler, by default, registered along with your Hive installation. | |
Register jar for HBase |
Click the | |
Advanced settings |
Tez lib |
Select how the Tez libraries are accessed:
|
Temporary path |
If you do not want to set the Jobtracker and the NameNode when you execute the query
| |
Trim all the String/Char columns |
Select this check box to remove leading and trailing whitespace from all the String/Char columns. | |
Trim column |
Remove leading and trailing whitespace from defined columns. NoteClear the Trim all the String/Char columns check box to enable Trim column in this field. | |
Hadoop properties |
Talend Studio uses a default configuration for its engine to perform operations in a Hadoop distribution. If you need to use a custom configuration in a specific situation, complete this table with the property or properties to be customized. Then at runtime, the customized property or properties will override those default ones.
For further information about the properties required by Hadoop and its related systems such as HDFS and Hive, see the documentation of the Hadoop distribution you are using or see Apache's Hadoop documentation on http://hadoop.apache.org/docs and then select the version of the documentation you want. For demonstration purposes, the links to some properties are listed below:
| |
Hive properties |
Talend Studio uses a default configuration for its engine to perform operations in a Hive database. If you need to use a custom configuration in a specific situation, complete this table with the property or properties to be customized. Then at runtime, the customized property or properties will override those default ones. For further information for Hive dedicated properties, see https://cwiki.apache.org/confluence/display/Hive/AdminManual+Configuration.
| |
Mapred job map memory mb and Mapred job reduce memory mb |
If the Hadoop distribution to be used is Hortonworks Data Platform V1.2 or Hortonworks Data Platform V1.3, you need to set proper memory allocations for the map and reduce computations to be performed by the Hadoop system. In that situation, you need to enter the values you need in the Mapred job map memory mb and the Mapred job reduce memory mb fields, respectively. By default, the values are both 1000 which are normally appropriate for running the computations. If the distribution is YARN, then the memory parameters to be set become Map (in Mb), Reduce (in Mb) and ApplicationMaster (in Mb), accordingly. These fields allow you to dynamically allocate memory to the map and the reduce computations and the ApplicationMaster of YARN. | |
Path separator in server |
Leave the default value of the Path separator in server as it is, unless you have changed the separator used by your Hadoop distribution's host machine for its PATH variable or in other words, that separator is not a colon (:). In that situation, you must change this value to the one you are using in that host. | |
|
tStatCatcher Statistics |
Select this check box to collect log data at the component level. |
Dynamic settings |
Click the [+] button to add a row in the table and fill the Code field with a context variable to choose your database connection dynamically from multiple connections planned in your Job. This feature is useful when you need to access database tables having the same data structure but in different databases, especially when you are working in an environment where you cannot change your Job settings, for example, when your Job has to be deployed and executed independent of Talend Studio. The Dynamic settings table is available only when the Use an existing connection check box is selected in the Basic settings view. Once a dynamic parameter is defined, the Component List box in the Basic settings view becomes unusable. For examples on using dynamic parameters, see Scenario 3: Reading data from MySQL databases through context-based dynamic connections and Scenario: Reading data from different MySQL databases using dynamically loaded connection parameters. For more information on Dynamic settings and context variables, see Talend Studio User Guide. | |
Global Variables |
NB_LINE: the number of rows read by an input component or transferred to an output component. This is an After variable and it returns an integer. QUERY: the query statement being processed. This is a Flow variable and it returns a string. ERROR_MESSAGE: the error message generated by the component when an error occurs. This is an After variable and it returns a string. This variable functions only if the Die on error check box is cleared, if the component has this check box. A Flow variable functions during the execution of a component while an After variable functions after the execution of the component. To fill up a field or expression with a variable, press Ctrl + Space to access the variable list and choose the variable to use from it. For further information about variables, see Talend Studio User Guide. | |
Usage |
This component offers the benefit of flexible DB queries and covers all possible Hive QL queries. If the Studio used to connect to a Hive database is operated on Windows, you must manually create a folder called tmp in the root of the disk where this Studio is installed. | |
Prerequisites |
The Hadoop distribution must be properly installed, so as to guarantee the interaction with Talend Studio. The following list presents MapR related information for example.
For further information about how to install a Hadoop distribution, see the manuals corresponding to the Hadoop distribution you are using. | |
Log4j |
If you are using a subscription-based version of the Studio, the activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User Guide. For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html. |
For a scenario about how an input component is used in a Job, see Scenario 1: Writing columns from a MySQL database to an output file.
You need to keep in mind the parameters required by Hadoop, such as NameNode and Jobtracker, when configuring this component since the component needs to connect to a Hadoop distribution.