Cloudera CCA175 CCA Spark and Hadoop Developer Exam Online Training
exams2023-10-31T02:47:23+00:00Cloudera CCA175 Online Training
The questions for CCA175 were last updated at May 15,2024.
- Exam Code: CCA175
- Exam Name: CCA Spark and Hadoop Developer Exam
- Certification Provider: Cloudera
- Latest update: May 15,2024
Also make sure you use orderid columns for sqoop to use for boundary conditions.
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:3306/retail_db
-username=retail_dba
-password=cloudera
-query="select’ from orders join order_items on orders.orderid = order_items.order_item_order_id where SCONDITlONS "
-target-dir /user/cloudera/order_join
-split-by order_id
–num-mappers 2
Step 3: Check imported data.
hdfs dfs -Is order_join
hdfs dfs -cat order_join/part-m-00000
hdfs dfs -cat order_join/part-m-00001
Also make sure you use orderid columns for sqoop to use for boundary conditions.
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:3306/retail_db
-username=retail_dba
-password=cloudera
-query="select’ from orders join order_items on orders.orderid = order_items.order_item_order_id where SCONDITlONS "
-target-dir /user/cloudera/order_join
-split-by order_id
–num-mappers 2
Step 3: Check imported data.
hdfs dfs -Is order_join
hdfs dfs -cat order_join/part-m-00000
hdfs dfs -cat order_join/part-m-00001
Also make sure you use orderid columns for sqoop to use for boundary conditions.
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:3306/retail_db
-username=retail_dba
-password=cloudera
-query="select’ from orders join order_items on orders.orderid = order_items.order_item_order_id where SCONDITlONS "
-target-dir /user/cloudera/order_join
-split-by order_id
–num-mappers 2
Step 3: Check imported data.
hdfs dfs -Is order_join
hdfs dfs -cat order_join/part-m-00000
hdfs dfs -cat order_join/part-m-00001
Also make sure you use orderid columns for sqoop to use for boundary conditions.
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:3306/retail_db
-username=retail_dba
-password=cloudera
-query="select’ from orders join order_items on orders.orderid = order_items.order_item_order_id where SCONDITlONS "
-target-dir /user/cloudera/order_join
-split-by order_id
–num-mappers 2
Step 3: Check imported data.
hdfs dfs -Is order_join
hdfs dfs -cat order_join/part-m-00000
hdfs dfs -cat order_join/part-m-00001
Also make sure your results fields are terminated by ‘|’ and lines terminated by ‘n
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
Also make sure your results fields are terminated by ‘|’ and lines terminated by ‘n
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
Also make sure your results fields are terminated by ‘|’ and lines terminated by ‘n
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
Also make sure your results fields are terminated by ‘|’ and lines terminated by ‘n
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
Please import data in a non-existing table, means while importing create hive table named hadoopexam.departments_new
Step 1: Go to hive interface and create database.
hive
create database hadoopexam;
Step 2. Use the database created in above step and then create table in it. use hadoopexam; show tables;
Step 3: Create table in it.
create table departments (department_id int, department_name string);
show tables;
desc departments;
desc formatted departments;
Step 4: Please check following directory must not exist else it will give error, hdfs dfs -Is /user/cloudera/departments
If directory already exists, make sure it is not useful and than delete the same.
This is the staging directory where Sqoop store the intermediate data before pushing in hive table.
hadoop fs -rm -R departments
Step 5: Now import data in existing table
sqoop import
-connect jdbc:mysql://quickstart:3306/retail_db
~username=retail_dba
-password=cloudera
–table departments
-hive-home /user/hive/warehouse
-hive-import
-hive-overwrite
-hive-table hadoopexam.departments
Step 6: Check whether data has been loaded or not.
hive;
use hadoopexam;
show tables;
select" from departments;
desc formatted departments;
Step 7: Import data in non-existing tables in hive and create table while importing.
sqoop import
-connect jdbc:mysql://quickstart:3306/retail_db
–username=retail_dba
~password=cloudera
-table departments
-hive-home /user/hive/warehouse
-hive-import
-hive-overwrite
-hive-table hadoopexam.departments_new
-create-hive-table
Step 8: Check-whether data has been loaded or not.
hive;
use hadoopexam;
show tables;
select" from departments_new;
desc formatted departments_new;
Please import data in a non-existing table, means while importing create hive table named hadoopexam.departments_new
Step 1: Go to hive interface and create database.
hive
create database hadoopexam;
Step 2. Use the database created in above step and then create table in it. use hadoopexam; show tables;
Step 3: Create table in it.
create table departments (department_id int, department_name string);
show tables;
desc departments;
desc formatted departments;
Step 4: Please check following directory must not exist else it will give error, hdfs dfs -Is /user/cloudera/departments
If directory already exists, make sure it is not useful and than delete the same.
This is the staging directory where Sqoop store the intermediate data before pushing in hive table.
hadoop fs -rm -R departments
Step 5: Now import data in existing table
sqoop import
-connect jdbc:mysql://quickstart:3306/retail_db
~username=retail_dba
-password=cloudera
–table departments
-hive-home /user/hive/warehouse
-hive-import
-hive-overwrite
-hive-table hadoopexam.departments
Step 6: Check whether data has been loaded or not.
hive;
use hadoopexam;
show tables;
select" from departments;
desc formatted departments;
Step 7: Import data in non-existing tables in hive and create table while importing.
sqoop import
-connect jdbc:mysql://quickstart:3306/retail_db
–username=retail_dba
~password=cloudera
-table departments
-hive-home /user/hive/warehouse
-hive-import
-hive-overwrite
-hive-table hadoopexam.departments_new
-create-hive-table
Step 8: Check-whether data has been loaded or not.
hive;
use hadoopexam;
show tables;
select" from departments_new;
desc formatted departments_new;