https://delta.io logo
a

Akeel Ahamed

03/16/2023, 2:02 PM
Hi, Any idea why the overwrite mode when set with option does not work with delta format. However when it is set using
mode(“overwrite”)
it works fine.
j

JosephK (exDatabricks)

03/16/2023, 2:05 PM
try
Copy code
.mode("ovewrite")
instead of the option
a

Akeel Ahamed

03/16/2023, 2:06 PM
Yes that works fine but we have a writer in our framework that can dynamically handle as many options as we like however it does not have the mode hardcoded inside. Thus I was finding a way to put this inside the options
The docs say it works but when trying it out it doesn’t.. or so it seems 🤔
j

JosephK (exDatabricks)

03/16/2023, 2:08 PM
Better for it to work and the docs to be wrong than the other way around
a

Akeel Ahamed

03/16/2023, 2:09 PM
No the syntax with
option(“mode”, “overwrite”)
doesn’t work although the docs say it does
And as can be seen from my image
g

Gerhard Brueckl

03/16/2023, 2:19 PM
maybe you want to try
option("overwrite", "true")
? just an idea though
a

Akeel Ahamed

03/16/2023, 2:22 PM
Tried that but got the same result unfortunately
j

Jim Hibbard

03/18/2023, 11:01 PM
I've run into this too. Not sure if this is a documentation bug or an option that never got implemented. I'll search for an existing issue and if I can't find it will make one for you. I agree it's a little annoying that you have to use the
.mode(...)
api. I prefer keyword unpacking a dict of args when able.
2 Views