jrunner: use bulk copy (-b) for SQL Server destinations
Pass jrunner's -b flag when the dest JDBC URL is jdbc:sqlserver:, so SQL Server loads stream via TDS bulk copy instead of 250-row INSERT...VALUES round trips. Non-SQL-Server dests are unchanged. Requires the jrunner -b support (bulk-copy branch). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
40c00bca7b
commit
ad14d0f5c9
@ -171,6 +171,11 @@ def migrate(
|
|||||||
argv.append("-t")
|
argv.append("-t")
|
||||||
if clear:
|
if clear:
|
||||||
argv.append("-c")
|
argv.append("-c")
|
||||||
|
# SQL Server dest: stream via TDS bulk copy instead of INSERT...VALUES
|
||||||
|
# round trips (much faster on wide/large tables). jrunner -b is a no-op
|
||||||
|
# for non-SQL-Server dests, but only pass it where it applies.
|
||||||
|
if (dest_conn.get("jdbc_url") or "").lower().startswith("jdbc:sqlserver:"):
|
||||||
|
argv.append("-b")
|
||||||
|
|
||||||
proc = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
proc = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||||
text=True, env=_subprocess_env())
|
text=True, env=_subprocess_env())
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user