Skip to content

Commit 253ca12

Browse files
fix: Address bulk api removing newlines (#76)
fixes #75
1 parent 3d5af42 commit 253ca12

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tap_salesforce/salesforce/bulk2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33
import sys
44
import time
5+
import io
56

67
import singer
78
from singer import metrics
@@ -24,7 +25,7 @@ def query(self, catalog_entry, state):
2425
self._wait_for_job(job_id)
2526

2627
for batch in self._get_next_batch(job_id):
27-
yield from csv.DictReader(batch.decode("utf-8").splitlines())
28+
yield from csv.DictReader(io.StringIO(batch.decode("utf-8").replace('\0', '')))
2829

2930
def _get_bulk_headers(self):
3031
return {**self.sf.auth.rest_headers, "Content-Type": "application/json"}

0 commit comments

Comments
 (0)