- All Exams Instant Download
Also make sure your results fields are terminated by '|' and lines terminated by 'n
Also make sure your results fields are terminated by '|' and lines terminated by 'nView AnswerAnswer: Solutions: Step 1: Clean the hdfs file system, if they exists clean out. hadoop fs -rm -R departments hadoop fs -rm -R categories hadoop fs -rm -R products hadoop fs -rm -R orders hadoop...
Store all the Java files in a directory called java_output to evalute the further
Store all the Java files in a directory called java_output to evalute the furtherView AnswerAnswer: Solution: Step 1: Drop all the tables, which we have created in previous problems. Before implementing the solution. Login to hive and execute following command. show tables; drop table categories; drop table customers; drop table...
Now do the incremental import based on created_date column.
Now do the incremental import based on created_date column.View AnswerAnswer: Solution: Step 1: Login to musql db mysql --user=retail_dba -password=cloudera show databases; use retail db; show tables; Step 2: Create a table as given in problem statement. CREATE table departments_new (department_id int(11), department_name varchar(45), createddate T1MESTAMP DEFAULT NOW()); show tables;...
Now import the data from following directory into departments_export table, /user/cloudera/departments new
Now import the data from following directory into departments_export table, /user/cloudera/departments newView AnswerAnswer: Solution: Step 1: Login to musql db mysql --user=retail_dba -password=cloudera show databases; use retail_db; show tables; step 2: Create a table as given in problem statement. CREATE table departments_export (departmentjd int(11), department_name varchar(45), created_date T1MESTAMP DEFAULT NOW());...
Data should be written as text to hdfs
Data should be written as text to hdfsView AnswerAnswer: Solution: Step 1: Create directory mkdir /tmp/spooldir2 Step 2: Create flume configuration file, with below configuration for source, sink and channel and save it in flume8.conf. agent1 .sources = source1 agent1.sinks = sink1a sink1b agent1.channels = channel1a channel1b agent1.sources.source1.channels = channel1a...
Data should be written as text to hdfs
Data should be written as text to hdfsView AnswerAnswer: Solution: Step 1: Create directory mkdir /tmp/spooldir/bb mkdir /tmp/spooldir/dr Step 2: Create flume configuration file, with below configuration for agent1.sources = source1 source2 agent1 .sinks = sink1 agent1.channels = channel1 agent1 .sources.source1.channels = channel1 agentl .sources.source2.channels = channell agent1 .sinks.sinkl.channel =...
Data should be written as text to hdfs
Data should be written as text to hdfsView AnswerAnswer: Solution: Step 1: Create directory mkdir /tmp/spooldir2 Step 2: Create flume configuration file, with below configuration for source, sink and channel and save it in flume8.conf. agent1 .sources = source1 agent1.sinks = sink1a sink1b agent1.channels = channel1a channel1b agent1.sources.source1.channels = channel1a...
Data should be written as text to hdfs
Data should be written as text to hdfsView AnswerAnswer: Solution: Step 1: Create directory mkdir /tmp/nrtcontent Step 2: Create flume configuration file, with below configuration for source, sink and channel and save it in flume6.conf. agent1 .sources = source1 agent1 .sinks = sink1 agent1.channels = channel1 agent1 .sources.source1.channels = channel1...
Problem Scenario 4: You have been given MySQL DB with following details.
Problem Scenario 4: You have been given MySQL DB with following details. user=retail_dba password=cloudera database=retail_db table=retail_db.categories jdbc URL = jdbc:mysql://quickstart:3306/retail_db Please accomplish following activities. Import Single table categories (Subset data} to hive managed table, where category_id between 1 and 22View AnswerAnswer: Solution: Step 1: Import Single table (Subset data) sqoop...
Data should be written as text to hdfs
Data should be written as text to hdfsView AnswerAnswer: Solution: Step 1: Create directory mkdir /tmp/spooldir/bb mkdir /tmp/spooldir/dr Step 2: Create flume configuration file, with below configuration for agent1.sources = source1 source2 agent1 .sinks = sink1 agent1.channels = channel1 agent1 .sources.source1.channels = channel1 agentl .sources.source2.channels = channell agent1 .sinks.sinkl.channel =...