Skip to content

Write Primitives bulk_load_upsert_mode

Write Primitives benchmark · all Write Primitives queries

Representative SQL

Rendered in the benchmark’s native SQL with default parameters (no dialect translation available).

MERGE INTO bulk_load_ops_target AS target
USING (
SELECT
*
FROM READ_CSV_AUTO('{file_path}/csv_upsert_data.csv')
) AS source
ON target.o_orderkey = source.o_orderkey
WHEN MATCHED THEN UPDATE SET
o_custkey = source.o_custkey,
o_orderstatus = source.o_orderstatus,
o_totalprice = source.o_totalprice,
o_orderdate = source.o_orderdate,
o_orderpriority = source.o_orderpriority,
o_clerk = source.o_clerk,
o_shippriority = source.o_shippriority,
o_comment = source.o_comment
WHEN NOT MATCHED THEN INSERT

Representative DataFrame

No DataFrame implementation is registered for this query.

Get the exact query for your run

The blocks above are representative. To get the precise statement a specific platform runs at a specific scale, substitute your own values:

from benchbox import WritePrimitives
bench = WritePrimitives(scale_factor=0.01) # your scale factor
print(bench.get_queries()['bulk_load_upsert_mode'])

Source

Query text: benchbox/core/write_primitives/operations.py