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