Hello! Can we do an upsert in the offline table us...
# general
s
Hello! Can we do an upsert in the offline table using IngestFromFile API?
m
upserts are only for real-time tables, so I’m thinking you can’t
m
Just to ensure you mean you want to upsert (mutate) individual rows? Or want to overwrite segments? You can do latter for offline tables but not former
s
I just want to set overwrite flag as true. I was able to set it in the standalone job but in API there is no option for the same. I want to mutate individual rows.
m
Which overwrite flag are you referring to? Stand-alone job is for offline. I feel when you say upsert you are not referring to upsert feature in Pinot real-time tables
s
Yes, I'm not referring to the real-time table. Below is my goal. I have one offline table where I want to ingest data through the
ingestFromFile
API. When I put the same primary key, it's getting duplicated in the offline table. It should at least replace the record instead of duplicating the same row. row 1 : data1, primary key 1 row 2: data2, primary key 1 Result in table two rows with the same primary key Expectation: one row with data2 value
m
Row level mutation is not supported in offline tables. I suspect what worked earlier was you ended up replacing the entire segment by pushing a new one with same name.