Skip to content

Commit

Permalink
Merge pull request #175 from rudderlabs/chore-enables-data-cloud-cont…
Browse files Browse the repository at this point in the history
…act-resource

fix: salesforce fixes
  • Loading branch information
a-rampalli committed Jan 29, 2024
2 parents 65ae6af + 05bd897 commit b094d6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"UserEntityAccess",
"UserFieldAccess",
"Vote",
"FlowTestView",
]

# The following objects are not supported by the query method being used.
Expand Down Expand Up @@ -126,7 +125,6 @@
"SessionHijackingEvent",
"UriEventStream",
"UserRecordAccess",
"DatacloudContact",
]

# The following objects are not supported by the Bulk API. Listed objects are version specific.
Expand Down Expand Up @@ -202,8 +200,8 @@
"ReportEvent",
"TabDefinition",
"UriEvent",
"PermissionSetEventStore",
"ActivityFieldHistory",
"PermissionSetEventStore",
]

RESOURCE_PRIMARY_KEY_MAP = {
Expand All @@ -215,7 +213,7 @@
"Publisher": "DurableId", # https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_publisher.htm
"ApexPageInfo": "DurableId" # https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apexpageinfo.htm
}
UNSUPPORTED_STREAMS = ["ActivityMetric", "ActivityMetricRollup", "PromotionTarget", "PromotionQualifier"]
UNSUPPORTED_STREAMS = ["ActivityMetric", "ActivityMetricRollup"]


class Salesforce:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ def download_data(self, url: str, chunk_size: int = 1024) -> tuple[str, str]:
# set filepath for binary data from response
tmp_file = os.path.realpath(os.path.basename(url))
with closing(self._send_http_request("GET", f"{url}/results", stream=True)) as response, open(tmp_file, "wb") as data_file:
response_encoding = response.encoding or self.encoding
self.logger.info(f"Logging encoding values \n actual header: {response.headers} \nresponse.encoding : {response.encoding} \n response.apparent_encoding : {response.apparent_encoding} \n self.encoding : {self.encoding}")
response_encoding = self.encoding
for chunk in response.iter_content(chunk_size=chunk_size):
data_file.write(self.filter_null_bytes(chunk))
# check the file exists
Expand Down

0 comments on commit b094d6d

Please sign in to comment.