A data analyst runs the following command:
SELECT age, country
FROM my_table
WHERE age >= 75 AND country = 'canada';
Which of the following tables represents the output of the above command?
A)
B)
C)
D)
E)
Option A uses theSELECT DISTINCTstatement to remove duplicate rows from thetable_bronzeand create a new tabletable_silverwith the deduplicated data.This is the correct way to deduplicate data using Spark SQL12. Option B simply inserts all the rows fromtable_bronzeintotable_silver, without removing any duplicates. Option C is not a valid syntax for Spark SQL, as there is noMERGE DEDUPLICATEstatement. Option D appends all the rows fromtable_bronzeintotable_silver, without removing any duplicates. Option E overwrites the existing data intable_silverwith the data fromtable_bronze, without removing any duplicates.Reference:Delete Duplicate using SPARK SQL,Spark SQL - How to Remove Duplicate Rows
Limited Time Offer
25%
Off
Teri
3 months agoThomasena
3 months agoJules
3 months agoTaryn
4 months agoMarya
4 months agoAntonio
4 months agoNobuko
4 months agoYoulanda
4 months agoJacqueline
5 months agoAntonio
5 months agoLuis
5 months agoMakeda
5 months agoRaina
5 months agoIsidra
5 months agoXochitl
5 months agoMichell
5 months agoLorean
5 months agoMelda
10 months agoAdolph
8 months agoThea
8 months agoLelia
8 months agoBettina
10 months agoJesusa
8 months agoShantell
8 months agoRolland
8 months agoCoral
10 months agoJesusita
10 months agoGlynda
9 months agoKris
9 months agoWilliam
10 months agoYoulanda
10 months agoLilli
11 months agoShasta
10 months agoPa
10 months agoTeri
11 months agoMarla
11 months agoFelicidad
11 months ago