We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Avoid loading duplicate tuple — Vertica Forum

Avoid loading duplicate tuple

create flex table flexT();

copy flexT from 'path/file1.json' parser fjsonparser();

but if we copy from same json file , i dont want to load this duplicate data.

copy flexT from 'path/file1.json' parser fjsonparser();

can anyone explain, how to discard this duplicate?

Thanks

Regards 
Naveen

Comments

  • Copy into a staging table. Merge from staging table into final table, skipping the WHEN MATCHED clause:
    MERGE INTO final_table f
      ON staging_table s
      USING (s.id = f.id)
      WHEN NOT MATCHED THEN INSERT(id, ...) VALUES(s.id, ...);

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file