Skip to content

Commit 6fb3e68

Browse files
committed
v0.0.63 expose use_bloom_filter in dump_to_sql
1 parent 8faa862 commit 6fb3e68

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

PROCESSORS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ def dump_to_sql(tables,
212212
- `true` - row was updated
213213
- `false` - row was inserted
214214
- `updated_id_column` - Optional name of a column that will be added to the output data containing the id of the updated row in DB.
215-
- `batch_size` - Maximum amount of rows to write at the same time to the DB.
215+
- `batch_size` - Maximum amount of rows to write at the same time to the DB (default 1000)
216+
- `use_bloom_filter` - Preprocess existing DB data to improve update performance (default: True)
216217

217218
#### checkpoint
218219

dataflows/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.62
1+
0.0.63

dataflows/processors/dumpers/to_sql.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def __init__(self,
7676
self.updated_column = updated_column
7777
self.updated_id_column = updated_id_column
7878
self.batch_size = options.get('batch_size', 1000)
79+
self.use_bloom_filter = options.get('use_bloom_filter', True)
7980

8081
def normalize_for_engine(self, dialect, resource, schema_descriptor):
8182
actions = {}
@@ -132,6 +133,7 @@ def process_resource(self, resource: ResourceWrapper):
132133
keyed=True, as_generator=True,
133134
update_keys=update_keys,
134135
buffer_size=self.batch_size,
136+
use_bloom_filter=self.use_bloom_filter,
135137
))
136138

137139
def get_output_row(self, written):

0 commit comments

Comments
 (0)