A data engineer wants to write a Spark job that creates a new managed table. If the table already exists, the job should fail and not modify anything.
Which save mode and method should be used?
The method saveAsTable() creates a new table and optionally fails if the table exists.
From Spark documentation:
'The mode 'ErrorIfExists' (default) will throw an error if the table already exists.'
Thus:
Option A is correct.
Option B (Overwrite) would overwrite existing data --- not acceptable here.
Option C and D use save(), which doesn't create a managed table with metadata in the metastore.
Final Answer: A
Chau
2 days agoVeta
7 days agoLaquanda
12 days agoJackie
18 days agoMaile
23 days agoKenneth
28 days agoGlory
1 month agoEulah
1 month agoLevi
1 month agoSabra
2 months agoCarey
2 months agoYuette
2 months ago