Valid CCA175 Dumps shared by EduDump.com for Helping Passing CCA175 Exam! EduDump.com now offer the newest CCA175 exam dumps, the EduDump.com CCA175 exam questions have been updated and answers have been corrected get the newest EduDump.com CCA175 dumps with Test Engine here:
CORRECT TEXT Problem Scenario 88 : You have been given below three files product.csv (Create this file in hdfs) productID,productCode,name,quantity,price,supplierid 1001,PEN,Pen Red,5000,1.23,501 1002,PEN,Pen Blue,8000,1.25,501 1003,PEN,Pen Black,2000,1.25,501 1004,PEC,Pencil 2B,10000,0.48,502 1005,PEC,Pencil 2H,8000,0.49,502 1006,PEC,Pencil HB,0,9999.99,502 2001,PEC,Pencil 3B,500,0.52,501 2002,PEC,Pencil 4B,200,0.62,501 2003,PEC,Pencil 5B,100,0.73,501 2004,PEC,Pencil 6B,500,0.47,502 supplier.csv supplierid,name,phone 501,ABC Traders,88881111 502,XYZ Company,88882222 503,QQ Corp,88883333 products_suppliers.csv productID,supplierID 2001,501 2002,501 2003,501 2004,502 2001,503 Now accomplish all the queries given in solution. 1. It is possible that, same product can be supplied by multiple supplier. Now find each product, its price according to each supplier. 2. Find all the supllier name, who are supplying 'Pencil 3B' 3. Find all the products , which are supplied by ABC Traders.
Correct Answer:
See the explanation for Step by Step Solution and configuration. Explanation: Solution : Step 1 : It is possible that, same product can be supplied by multiple supplier. Now find each product, its price according to each supplier. val results = sqlContext.sql(......SELECT products.name AS Product Name', price, suppliers.name AS Supplier Name' FROM products_suppliers JOIN products ON products_suppliers.productlD = products.productID JOIN suppliers ON products_suppliers.supplierlD = suppliers.supplierlD null t results.show() Step 2 : Find all the supllier name, who are supplying 'Pencil 3B' val results = sqlContext.sql(......SELECT p.name AS 'Product Name", s.name AS "Supplier Name' FROM products_suppliers AS ps JOIN products AS p ON ps.productID = p.productID JOIN suppliers AS s ON ps.supplierlD = s.supplierlD WHERE p.name = 'Pencil 3B"",M ) results.show() Step 3 : Find all the products , which are supplied by ABC Traders. val results = sqlContext.sql(......SELECT p.name AS 'Product Name", s.name AS "Supplier Name' FROM products AS p, products_suppliers AS ps, suppliers AS s WHERE p.productID = ps.productID AND ps.supplierlD = s.supplierlD AND s.name = 'ABC Traders".....) results. show()