Você está na página 1de 24

DISCLAIMER

Before Isend this,


Iwant to mention that it might
be either right or wrong, So
ultimately, its up to you
decide"
Nongoodo?
Mangpdlb cs
a cvos platon , oren
Uulatinalostrtbutod datbaye
boure, Non elatinal
Sa) and
m ned it s Wosak (notonly
doumet orant od data dtoe
Houw uis you nd and mid uthe no tË doumart
a.tolectin?
To yind a ooscn en qutrìlue

do etudts ind
8aluctim eftoue

|LAntt

dha qolioui
FNo uord onl
Bhous
How wU Yeu odort and kip doemant Tn a

|Sort

data ini artn astandung 1 duendang91

OTduihen sthe doumet


dhe colecton
ntox
db. dtudart 4ndO, dort CI Nama 1)
I> dbanding orolay
orden.

he. bkp çs wedl to skip the humba,


ounents om thi int ooupant.

Akip
uh o the tommand to
umee?
)-thtkls

Dplain CR¯D'ad plat'


laor
rRODiCMeate( Rogd, updat ,Delote .
CMeato -> erotion data s olene

RoodcA metthod
’upata, to olata s acomplishod
ug pdats () nithcdlei
Deleto

lmouec) method
partA

Lt aduantags
Qectue the dpat. do dkors ile
Sheecls up data tranlen asn th
hetuok

| it anl eaplain the optinizatn teckiq ?


pat B

Tmpot
To Pmypot data les yrom daal t the

Nagofmpbnt --db deit islactn Bamgla JSON


CAV --hsodanlina -a d:l tbst.d

+b530 lmportal aobiu


Eapet
TO OAHot Mamwg db data to oca ue the

Mngoeport db dt -- latlactn Cunttner


--CSV --ald le d:leld.trt --outdllout.
An cthe laeuih the output ke

H erds
uite ün detal dbout bouos un iongelb
potrcten to the e l t det

a qee. uhen you eaecute aa queny an


Nono
t closne tmmeciatily etn autlu mathina
documet twtead ic oetwy a lusw.

a eneat alphalaeti lettis doumna (a4)

ha alphalac Calections

dl. aphabeti tnet (rol:24 ,alphabet:


St Lot "es destgn manua 'cwisor to tenb
ctough the oloumarct
TuLo method

heat )) '

hasNentt) I- Ratun vaya Bo Luan.it


rue - Cwsor utned ky the

The, n t ) method ouLtns thu

bruttuinas by the dis wiuctim idi


alphabat Tha
alphabet The
0 The
Qtutput!.
e)t (ny (unctey Eaun yor Cu.n
Retlea.
alphabet The
alynabetnla The
alphebet The
hasnat unile
alphabcts.
jug dh. nyun= \n
dhot hot tn mapRadue aunetin
Mongodb!
The ap Aoduca dunction s a mothod ton
eting ard anaufzing Qeng volunu opdataun
to honlorm
omglia agngtind and cranjoimatid on
Colction

thee ahe Yowr cloumet 1, Run a

Aae btven tnans


Faample doumenth
doument
Custrd cI23;
acc bal 600

CutomUy

Cuutfd: en3i
Cee bal: 00

Cutd c23,
a bal? qoo, cuu?d: ci23,

Cutd: Cll
acc bal: n001

acc al! 2p0,


1200
Conte]
plagnamatfealy
dnplain b map Redue
an Ningodb

Cuuytometotah
Syndas -
ollb. Cutoms . map Recule (map, kduu uy)
whe map ’ nction () |enia tthis
ths AcL Bal 3jt,
oudue lunctim (uuy, Valued
0Ubput out
itoNom-total, 4

|Fgmplel
cb.ctois. map Pedue
CroaSr
Ridluica
but: utomenTOtals'
ptput

Cvtome-totals

Sloouce&
QwputQtc
a new
Cocti utome total and baue butput
turit bhor nst on aagatt n oy
n
oingodb ?
aggpragatin onealew on
data
Celeon.
BA alou, you
you to hous and analyzedat;
tuuhee lach
apreline dtas
hajom a shetie oysatiis
tha, oynetins

T6 ilten out tteye dotumant unee CL Tynehas


a Vae oth than S.

Cunt d n3)

acbli Goo,

(Ctd: C23,
ace bals qo07 id: c23,
TOteli0o
Leurid: cn3
ae bal: 9001

Total:120

oCL Gal2 200

ICutld: ci23,
c bal? 500)
)TO oup Cutid and Compucte dum
olb Cuuomtr. ngat

total bal:{

To qnoup on uted and. Coput tu


aurage

clb. Cuutomers
-d . utID,

To etrigue ony'the auount ty e is

db. tomey.

The dot nction dhct wed to


sthe co umnt etthe

Jon Detendig
RDBMS MangoD8 .
bata Modas s iko
The data od
s talbway dtruchwe DOunet orientaton

Gany canquagBuong dangag


Mongobe.
lstor?zotc

Flaod hema
with redainod uth eiide ooumout
sOaHonahns Strutwe

Ligted traunsaction
suport duppovt
|SyntbiHenenat
db. ctdent.ont(
vales( ) 3 koy: Nae)
b. tucrt .upoat (auon
Cotun
uhore
Valuey
Hleelets om dtet
wwhere Londuti db. studant Yemoue (Is)

palett t nom itelant)


) aeleot + om hudent db. dtudut nd
there ondttion
like
uhat cUe dhe datetyjnu an orgodl daplain 1
o92 yafous datatypus Morgde.

Pooleon
Doubla To ea loting potr

SPmestamp V0 eovol uhen a dottert has ban


te Modeol on adelaol.
Nul TO toe. Nu Vatues
Dcte
-T0 atona bfray data
dairasion.

)Cnoat Drep databaye


do cin Moygodle!

TO
8how

2333Tb dop dat açaue ahne that wne the datob aue

,
uite a iort note en Uen wit
(ompk nd panuttfonen wtth cran,

Rodueent
tnteumoiato Vàlues to a
&nallen dt Vales
R+ has thee phoen

ouhput oirat
8he and.cortk.
phare taka, sthe Qutputo4 the
paHtionra ud dounloal them tto the
dal machi here reducon'io nunning.

qhe aLduer taees the qouec data


Bort pha

opot time
Output Format
The Qutput format Aprat yr
Vale pain ut th tab (olapaut) aud
wrto
Comsni
n Upization techniaue
Yer maup Reduce Job the aeduon clon
Bet to be,the tombtnen clas . he
hetuan Cerbinen clan' and heclue
cleus

* Output genenaited ytomtnen is Tntsn


medat dat and útit o pawed t dun.

pantftiorenj- h
The' porttioning phase happns ajtn
map phone andl beforu. edue phare. th
emser patt tions ane eqal to the

[înput Pnput tnput


hpid apüt Ahlit

uapp MOppen [ Mappen


ZHZ
Combire (lobtra

paition patto [partiti

8hutle dort
1ö12 z:943+3
Recluten

1. The chs b appen wmStren


patttionen ane
Raduun.
part-E
Tnd, updatt I-olelet
aliting olounent?
|Dtion

*Fretva
FnaetOne -

EROmpe
cb..udent. uertoneCd
name i kabil",

phone Bo123l6G

Vhe fne many mthad yed cto fruent


MulApe douments
do. duclent. fnuet Many ( I Lid:
rame auin
Cgpai 8.5 3,

hame; 0euanh s.

phonei 82104 5833|

typdat
The updati Metwod weod to updati
dount n the ioction
The. wpoath metod haue. tüe t9res.

updota One ) -
tis metnod ondy updates an
doument.
yntoa db. atudeunt ydata one ( lquery'ý

o wpdati te age ythe Atuaent uhene

lb. tudrct; updati One. CI (qp: 8.863

updati man
he updata mony methgd alloy
|May document

db: dtudent pdat any ( Y,


a . 8 . n t i t dot,: Iage: ao%S)
Vhe alboue Queny cupdat all doumut ae
Taletien r
Vhe peMOUe method io wed cto dalote
n clournent
8yntoa dh Liollection . Oiemoua lt

db. olticint. bameue (I3)

too eul you ind doumerty baned tm


uetwod dhat aae wed to
all dthe doimonts en an coletion

db. Ahdet. qnd ( Ty )


Seleitun oojecti
(:}jrtteia
ompa, coument
hame
kabi) 8.8
2| knsh 8.83 2023
2022
3 suin
8.9 2023
thet ane. dtha Poyslba cuao
Une puietr ind melhod.
yind Onac)F
Thio thod otrioe, bny ona. documant
db .udct, indona l)
This metrod reues al douminty
db. drdet. yind C)
reiectionj
te
"The. orjatton iethod allous you
diaplay aan elc

db dttivt.tind (Cy,-idi0, nama ;l,


(t
fotpuri
L name kabil, 213
. 7 hame krshi, 23
hama!' Asutn 23
Y hame| Veean, a0

wwing platignad oqaetos slaction


petrieue ritaia
ane
The pos?be oulattons proatau
aser than
les than orc a
gtonthan
paey thanbraqia

hetcqal.
($t):
auer than ($
ehire gpa hinen than &8
To betrile doumet
db. ddend . yund Z cgpa $Le": g.813)
hame dsin, age: 2, qaia
I-id i 3,
+atan than oÝ Qqual (gte)
actrheua, the dotuments uihere gra is
g&e. &.&.
db. dtdordt
Duputl

not squal (ne)

owputt

|Brting
dato emilt tastendng conanqung
rden.
To uiee th alementp Quenáng

db. dtudant . yind) . dot CUiainma g-19)


Limit
LPmit hod wed to display nitad
the wen,
anount o documant baihy by
db. adtebt. ind ). aimid (4)
The aloe quey only ou.ue tuo dotume
skepi
The akip mehad weot sto Ahip tha
coumects.
db. tuclavc. ted C). bkip(3)
output

dhu aboue. query te bhp nuthad


he. bkep that
n
the dlocumerl.

utth tRampla taplain Mapled1ee


poegiamni!
n Map Rocue poegammu Jobs a
kplt nto t o nap tayes and r l e

dutibuted yashion en todoop cluyt.

Fah tayk' yotenes dmal. dubet


olata that has been igcl to it.
rdue
srona in HDES,

thaormung and alteing and ouciee u


grouping and aggrgation
Yhe map tok s ookan tnto
(Reord Roaden

The oucwe stoyks ae;

Rdue
(ha0utput yomat

EDampla.
anput
áplit

MaPpn

Combinen tombtren Comathen Conktnan

Partt tforen pantttionen panttions

Shufple and sort

Reduen Peducer
koduen
Mappeni
re Indlldual tasks cthct haue
the ouspontslty o dranjorming put
oUorcs unto Frtarn madfat, key Value pan
DRoool Reoer
2 aeet dhe toske usth ky and
Vale
bunmally dha y
Tyotmation Qnd Value a chunk o data that
Contittes the Geloral
pmap Maptunetien work gn the key Vala paun
intoreollatt key Value par
ombinen
D uo an Dpttonal! yunction but rouldes
b netuotk banoluldth
and dik slpae b):
pntitiongsi.
pauftion take, the Phteomaliataks
Value pa pocouad by the mapeer, apit them
Snto dhand and oncs the adhad to pantiuon

Ther kodusen ias thaea pimany phai ; shelle


Ond dort. kedue and ouputtormat.
and ort :
This Cutpu e althe
þhals talces the
þartitonons and downloeds hem Pnto the
b ownng.
doal nachfne uhere the. oredcon
orelorteol
Vhen sthese. nelulual data pines
by key unichhodue deoen odata it.
The qrouped ola'a
vhe Keden ctaes
dhla do phane
Madued by. dha atate
functiom and rsoes ona qroup
8) oupcr yotmat key-vala
Tha Giutpu ormat depaats
ng eLord wnia

Combnn? is n optfmz ation techa qe tou


ebi buanerallyhe
Map Rodue Jobu! aeduer clas
deti to tonót non Clas, The diferena beta
betueen combthe clas and esuei lau

ab
ata and it bawed to Seduen

the, outpu

the pariHenen phane hapreas


altn map phare and before necle phwe.
he nemben sotons ahes dqal to

partftionen is hash parttionen,.

Você também pode gostar