Question # 1 Problem Scenario 12 : You have been given following mysql database details as well as other info. user=retail_dba password=cloudera database=retail_db jdbc URL = jdbc:mysql://quickstart:3306/retail_db Please accomplish following. 1. Create a table in retailedb with following definition. CREATE table departments_new (department_id int(11), department_name varchar(45), created_date T1MESTAMP DEFAULT NOW()); 2. Now isert records from departments table to departments_new 3. Now import data from departments_new table to hdfs. 4. Insert following 5 records in departmentsnew table. Insert into departments_new values(110, "Civil" , null); Insert into departments_new values(111, "Mechanical" , null); Insert into departments_new values(112, "Automobile" , null); Insert into departments_new values(113, "Pharma" , null); Insert into departments_new values(114, "Social Engineering" , null); 5. Now do the incremental import based on created_date column.
Answer Description Answer: See the explanation for Step by Step Solution and configuration. Explanation: 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; Step 3 : isert records from departments table to departments_new insert into departments_new select a.", null from departments a; Step 4 : Import data from departments new table to hdfs. sqoop import \ -connect jdbc:mysql://quickstart:330G/retail_db \ ~username=retail_dba \ -password=cloudera \ -table departments_new\ -target-dir /user/cloudera/departments_new \ -split-by departments Stpe 5 : Check the imported data. hdfs dfs -cat /user/cloudera/departmentsnew/part" Step 6 : Insert following 5 records in departmentsnew table. Insert into departments_new values(110, "Civil" , null); Insert into departments_new values(111, "Mechanical" , null); Insert into departments_new values(112, "Automobile" , null); Insert into departments_new values(113, "Pharma" , null); Insert into departments_new values(114, "Social Engineering" , null); commit; Stpe 7 : Import incremetal data based on created_date column. sqoop import \ -connect jdbc:mysql://quickstart:330G/retaiI_db \ -username=retail_dba \ -password=cloudera \ -table departments_new\ -target-dir /user/cloudera/departments_new \ -append \ -check-column created_date \ -incremental lastmodified \ -split-by departments \ -last-value "2016-01-30 12:07:37.0" Step 8 : Check the imported value. hdfs dfs -cat /user/cloudera/departmentsnew/part"
Question # 2 Problem Scenario 14 : You have been given following mysql database details as well as other info. user=retail_dba password=cloudera database=retail_db jdbc URL = jdbc:mysql://quickstart:3306/retail_db Please accomplish following activities. 1. Create a csv file named updated_departments.csv with the following contents in local file system. updated_departments.csv 2,fitness 3,footwear 12,fathematics 13,fcience 14,engineering 1000,management 2. Upload this csv file to hdfs filesystem, 3. Now export this data from hdfs to mysql retaildb.departments table. During upload make sure existing department will just updated and new departments needs to be inserted. 4. Now update updated_departments.csv file with below content. 2,Fitness 3,Footwear 12,Fathematics 13,Science 14,Engineering 1000,Management 2000,Quality Check 5. Now upload this file to hdfs. 6. Now export this data from hdfs to mysql retail_db.departments table. During upload make sure existing department will just updated and no new departments needs to be inserted.
Answer Description Answer: See the explanation for Step by Step Solution and configuration. Explanation: Solution : Step 1 : Create a csv tile named updateddepartments.csv with give content. Step 2 : Now upload this tile to HDFS. Create a directory called newdata. hdfs dfs -mkdir new_data hdfs dfs -put updated_departments.csv newdata/ Step 3 : Check whether tile is uploaded or not. hdfs dfs -Is new_data Step 4 : Export this file to departments table using sqoop. sqoop export -connect jdbc:mysql://quickstart:3306/retail_db \ -username retail_dba \ -password cloudera \ -table departments \ -export-dir new_data \ -batch \ -m 1 \ -update-key department_id \ -update-mode allowinsert Step 5 : Check whether required data upsert is done or not. mysql -user=retail_dba - password=cloudera show databases; use retail_db; show tables; select" from departments; Step 6 : Update updated_departments.csv file. Step 7 : Override the existing file in hdfs. hdfs dfs -put updated_departments.csv newdata/ Step 8 : Now do the Sqoop export as per the requirement. sqoop export -connect jdbc:mysql://quickstart:3306/retail_db \ -username retail_dba\-password cloudera \ -table departments \ -export-dir new_data \ -batch \ -m 1 \ -update-key-department_id \ -update-mode updateonly Step 9 : Check whether required data update is done or not. mysql -user=retail_dba - password=cloudera show databases; use retail db; show tables; select" from departments;
Question # 3 Problem Scenario 55 : You have been given below code snippet. val pairRDDI = sc.parallelize(List( ("cat",2), ("cat", 5), ("book", 4),("cat", 12))) val pairRDD2 = sc.parallelize(List( ("cat",2), ("cup", 5), ("mouse", 4),("cat", 12))) operation1 Write a correct code snippet for operationl which will produce desired output, shown below. Array[(String, (Option[lnt], Option[lnt]))] = Array((book,(Some(4},None)), (mouse,(None,Some(4))), (cup,(None,Some(5))), (cat,(Some(2),Some(2)), (cat,(Some(2),Some(12))), (cat,(Some(5),Some(2))), (cat,(Some(5),Some(12))), (cat,(Some(12),Some(2))), (cat,(Some(12),Some(12)))J
Answer Description Answer: See the explanation for Step by Step Solution and configuration. Explanation: Solution : pairRDD1.fullOuterJoin(pairRDD2).collect fullOuterJoin [Pair] Performs the full outer join between two paired RDDs. Listing Variants def fullOuterJoin[W](other: RDD[(K, W)], numPartitions: Int): RDD[(K, (Option[V], OptionfW]))] def fullOuterJoin[W](other: RDD[(K, W}]}: RDD[(K, (Option[V], OptionfW]))] def fullOuterJoin[W](other: RDD[(K, W)], partitioner: Partitioner): RDD[(K, (Option[V], Option[W]))]
Question # 4 Problem Scenario 15 : You have been given following mysql database details as well as other info. user=retail_dba password=cloudera database=retail_db jdbc URL = jdbc:mysql://quickstart:3306/retail_db Please accomplish following activities. 1. In mysql departments table please insert following record. Insert into departments values(9999, '"Data Science"1); 2. Now there is a downstream system which will process dumps of this file. However, system is designed the way that it can process only files if fields are enlcosed in(') single quote and separate of the field should be (-} and line needs to be terminated by : (colon). 3. If data itself contains the " (double quote } than it should be escaped by \. 4. Please import the departments table in a directory called departments_enclosedby and file should be able to process by downstream system.
Answer Description Answer: See the explanation for Step by Step Solution and configuration. Explanation: Solution : Step 1 : Connect to mysql database. mysql -user=retail_dba -password=cloudera show databases; use retail_db; show tables; Insert record Insert into departments values(9999, '"Data Science"'); select" from departments; Step 2 : Import data as per requirement. sqoop import \ -connect jdbc:mysql;//quickstart:3306/retail_db \ ~username=retail_dba \ -password=cloudera \ -table departments \ -target-dir /user/cloudera/departments_enclosedby \ -enclosed-by V -escaped-by \\ -fields-terminated-by-' -lines-terminated-by : Step 3 : Check the result. hdfs dfs -cat/user/cloudera/departments_enclosedby/part"
Question # 5 Problem Scenario 9 : You have been given following mysql database details as well as other info. user=retail_dba password=cloudera database=retail_db jdbc URL = jdbc:mysql://quickstart:3306/retail_db Please accomplish following. 1. Import departments table in a directory. 2. Again import departments table same directory (However, directory already exist hence it should not overrride and append the results) 3. Also make sure your results fields are terminated by '|' and lines terminated by '\n\
Answer Description Answer: See the explanation for Step by Step Solution and configuration. Explanation: 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 fs -rm -R order_items hadoop fs -rm -R customers Step 2 : Now import the department table as per requirement. sqoop import \ -connect jdbc:mysql://quickstart:330G/retaiI_db \ -username=retail_dba \ -password=cloudera \ -table departments \ -target-dir=departments \ -fields-terminated-by '|' \ -lines-terminated-by '\n' \ -ml Step 3 : Check imported data. hdfs dfs -Is departments hdfs dfs -cat departments/part-m-00000 Step 4 : Now again import data and needs to appended. sqoop import \ -connect jdbc:mysql://quickstart:3306/retail_db \ -username=retail_dba \ -password=cloudera \ -table departments \ -target-dir departments \ -append \ -tields-terminated-by '|' \ -lines-termtnated-by '\n' \ -ml Step 5 : Again Check the results hdfs dfs -Is departments hdfs dfs -cat departments/part-m-00001
Question # 6 Problem Scenario 27 : You need to implement near real time solutions for collecting information when submitted in file with below information. Data echo "IBM,100,20160104" >> /tmp/spooldir/bb/.bb.txt echo "IBM,103,20160105" >> /tmp/spooldir/bb/.bb.txt mv /tmp/spooldir/bb/.bb.txt /tmp/spooldir/bb/bb.txt After few mins echo "IBM,100.2,20160104" >> /tmp/spooldir/dr/.dr.txt echo "IBM,103.1,20160105" >> /tmp/spooldir/dr/.dr.txt mv /tmp/spooldir/dr/.dr.txt /tmp/spooldir/dr/dr.txt Requirements: You have been given below directory location (if not available than create it) /tmp/spooldir . You have a finacial subscription for getting stock prices from BloomBerg as well as Reuters and using ftp you download every hour new files from their respective ftp site in directories /tmp/spooldir/bb and /tmp/spooldir/dr respectively. As soon as file committed in this directory that needs to be available in hdfs in /tmp/flume/finance location in a single directory. Write a flume configuration file named flume7.conf and use it to load data in hdfs with following additional properties . 1. Spool /tmp/spooldir/bb and /tmp/spooldir/dr 2. File prefix in hdfs sholuld be events 3. File suffix should be .log 4. If file is not commited and in use than it should have _ as prefix. 5. Data should be written as text to hdfs
Answer Description Answer: See the explanation for Step by Step Solution and configuration. Explanation: 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 = channell agent1 .sources.source1.type = spooldir agent1 .sources.sourcel.spoolDir = /tmp/spooldir/bb agent1 .sources.source2.type = spooldir agent1 .sources.source2.spoolDir = /tmp/spooldir/dr agent1 .sinks.sink1.type = hdfs agent1 .sinks.sink1.hdfs.path = /tmp/flume/finance agent1-sinks.sink1.hdfs.filePrefix = events agent1.sinks.sink1.hdfs.fileSuffix = .log agent1 .sinks.sink1.hdfs.inUsePrefix = _ agent1 .sinks.sink1.hdfs.fileType = Data Stream agent1.channels.channel1.type = file Step 4 : Run below command which will use this configuration file and append data in hdfs. Start flume service: flume-ng agent -conf /home/cloudera/flumeconf -conf-file /home/cloudera/fIumeconf/fIume7.conf -name agent1 Step 5 : Open another terminal and create a file in /tmp/spooldir/ echo "IBM,100,20160104" » /tmp/spooldir/bb/.bb.txt echo "IBM,103,20160105" » /tmp/spooldir/bb/.bb.txt mv /tmp/spooldir/bb/.bb.txt /tmp/spooldir/bb/bb.txt After few mins echo "IBM,100.2,20160104" » /tmp/spooldir/dr/.dr.txt echo "IBM,103.1,20160105" »/tmp/spooldir/dr/.dr.txt mv /tmp/spooldir/dr/.dr.txt /tmp/spooldir/dr/dr.txt
Question # 7 Problem Scenario 82 : You have been given table in Hive with following structure (Which you have created in previous exercise). productid int code string name string quantity int price float Using SparkSQL accomplish following activities. 1. Select all the products name and quantity having quantity <= 2000 2. Select name and price of the product having code as 'PEN' 3. Select all the products, which name starts with PENCIL 4. Select all products which "name" begins with 'P\ followed by any two characters, followed by space, followed by zero or more characters
Answer Description Answer: See the explanation for Step by Step Solution and configuration. Explanation: Solution : Step 1 : Copy following tile (Mandatory Step in Cloudera QuickVM) if you have not done it. sudo su root cp /usr/lib/hive/conf/hive-site.xml /usr/lib/sparkVconf/ Step 2 : Now start spark-shell Step 3 ; Select all the products name and quantity having quantity <= 2000 val results = sqlContext.sql(......SELECT name, quantity FROM products WHERE quantity <= 2000......) results.showQ Step 4 : Select name and price of the product having code as 'PEN' val results = sqlContext.sql(......SELECT name, price FROM products WHERE code = 'PEN.......) results. showQ Step 5 : Select all the products , which name starts with PENCIL val results = sqlContext.sql(......SELECT name, price FROM products WHERE upper(name) LIKE 'PENCIL%.......} results. showQ Step 6 : select all products which "name" begins with 'P', followed by any two characters, followed by space, followed byzero or more characters - "name" begins with 'P', followed by any two characters, - followed by space, followed by zero or more characters val results = sqlContext.sql(......SELECT name, price FROM products WHERE name LIKE 'P_ %.......) results. show()
Question # 8 Problem Scenario 26 : You need to implement near real time solutions for collecting information when submitted in file with below information. You have been given below directory location (if not available than create it) /tmp/nrtcontent. Assume your departments upstream service is continuously committing data in this directory as a new file (not stream of data, because it is near real time solution). As soon as file committed in this directory that needs to be available in hdfs in /tmp/flume location Data echo "I am preparing for CCA175 from ABCTECH.com" > /tmp/nrtcontent/.he1.txt mv /tmp/nrtcontent/.he1.txt /tmp/nrtcontent/he1.txt After few mins echo "I am preparing for CCA175 from TopTech.com" > /tmp/nrtcontent/.qt1.txt mv /tmp/nrtcontent/.qt1.txt /tmp/nrtcontent/qt1.txt Write a flume configuration file named flumes.conf and use it to load data in hdfs with following additional properties. 1. Spool /tmp/nrtcontent 2. File prefix in hdfs sholuld be events 3. File suffix should be Jog 4. If file is not commited and in use than it should have as prefix. 5. Data should be written as text to hdfs
Answer Description Answer: See the explanation for Step by Step Solution and configuration. Explanation: 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 agent1 .sinks.sink1.channel = channel1 agent1 .sources.source1.type = spooldir agent1 .sources.source1.spoolDir = /tmp/nrtcontent agent1 .sinks.sink1 .type = hdfs agent1 .sinks.sink1.hdfs.path = /tmp/flume agent1.sinks.sink1.hdfs.filePrefix = events agent1.sinks.sink1.hdfs.fileSuffix = .log agent1 .sinks.sink1.hdfs.inUsePrefix = _ agent1 .sinks.sink1.hdfs.fileType = Data Stream Step 4 : Run below command which will use this configuration file and append data in hdfs. Start flume service: flume-ng agent -conf /home/cloudera/flumeconf -conf-file /home/cloudera/fIumeconf/fIume6.conf -name agent1 Step 5 : Open another terminal and create a file in /tmp/nrtcontent echo "I am preparing for CCA175 from ABCTechm.com" > /tmp/nrtcontent/.he1.txt mv /tmp/nrtcontent/.he1.txt /tmp/nrtcontent/he1.txt After few mins echo "I am preparing for CCA175 from TopTech.com" > /tmp/nrtcontent/.qt1.txt mv /tmp/nrtcontent/.qt1.txt /tmp/nrtcontent/qt1.txt
Up-to-Date
We always provide up-to-date CCA175 exam dumps to our clients. Keep checking website for updates and download.
Excellence
Quality and excellence of our CCA Spark and Hadoop Developer Exam practice questions are above customers expectations. Contact live chat to know more.
Success
Your SUCCESS is assured with the CCA175 exam questions of passin1day.com. Just Buy, Prepare and PASS!
Quality
All our braindumps are verified with their correct answers. Download CCA Spark and Hadoop Developer Practice tests in a printable PDF format.
Basic
$80
Any 3 Exams of Your Choice
3 Exams PDF + Online Test Engine
Buy Now
Premium
$100
Any 4 Exams of Your Choice
4 Exams PDF + Online Test Engine
Buy Now
Gold
$125
Any 5 Exams of Your Choice
5 Exams PDF + Online Test Engine
Buy Now
Passin1Day has a big success story in last 12 years with a long list of satisfied customers.
We are UK based company, selling CCA175 practice test questions answers. We have a team of 34 people in Research, Writing, QA, Sales, Support and Marketing departments and helping people get success in their life.
We dont have a single unsatisfied Cloudera customer in this time. Our customers are our asset and precious to us more than their money.
CCA175 Dumps
We have recently updated Cloudera CCA175 dumps study guide. You can use our CCA Spark and Hadoop Developer braindumps and pass your exam in just 24 hours. Our CCA Spark and Hadoop Developer Exam real exam contains latest questions. We are providing Cloudera CCA175 dumps with updates for 3 months. You can purchase in advance and start studying. Whenever Cloudera update CCA Spark and Hadoop Developer Exam exam, we also update our file with new questions. Passin1day is here to provide real CCA175 exam questions to people who find it difficult to pass exam
CCA Spark and Hadoop Developer can advance your marketability and prove to be a key to differentiating you from those who have no certification and Passin1day is there to help you pass exam with CCA175 dumps. Cloudera Certifications demonstrate your competence and make your discerning employers recognize that CCA Spark and Hadoop Developer Exam certified employees are more valuable to their organizations and customers. We have helped thousands of customers so far in achieving their goals. Our excellent comprehensive Cloudera exam dumps will enable you to pass your certification CCA Spark and Hadoop Developer exam in just a single try. Passin1day is offering CCA175 braindumps which are accurate and of high-quality verified by the IT professionals. Candidates can instantly download CCA Spark and Hadoop Developer dumps and access them at any device after purchase. Online CCA Spark and Hadoop Developer Exam practice tests are planned and designed to prepare you completely for the real Cloudera exam condition. Free CCA175 dumps demos can be available on customer’s demand to check before placing an order.
What Our Customers Say
Jeff Brown
Thanks you so much passin1day.com team for all the help that you have provided me in my Cloudera exam. I will use your dumps for next certification as well.
Mareena Frederick
You guys are awesome. Even 1 day is too much. I prepared my exam in just 3 hours with your CCA175 exam dumps and passed it in first attempt :)
Ralph Donald
I am the fully satisfied customer of passin1day.com. I have passed my exam using your CCA Spark and Hadoop Developer Exam braindumps in first attempt. You guys are the secret behind my success ;)
Lilly Solomon
I was so depressed when I get failed in my Cisco exam but thanks GOD you guys exist and helped me in passing my exams. I am nothing without you.