Skip to content

Commit

Permalink
Merge branch 'main' into chore-tempZendeskAuthChange
Browse files Browse the repository at this point in the history
  • Loading branch information
a-rampalli committed Aug 21, 2023
2 parents d99276f + c3665e8 commit dd4e92c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@
"description": "If not set, data from up to one year ago will replicated by default.",
"examples": ["2021-11-16"],
"pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2}Z)?$",
"format": "date-time"
"format": "date"
},
"end_date": {
"order": 6,
"title": "End Date",
"type": "string",
"examples": ["2021-11-16"],
"pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2}Z)?$",
"format": "date-time"
"format": "date"
},
"region": {
"order": 7,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,17 @@ def process_response(self, response: requests.Response, **kwargs) -> Iterable[Ma
# We prefer response.iter_lines() to response.text.split_lines() as the later can missparse text properties embeding linebreaks
for record in self.iter_dicts(response.iter_lines(decode_unicode=True)):
# transform record into flat dict structure
item = {"event": record["event"]}
# Changed event property name to "mp_event" to avoid conflict with "event" reserved property
item = {"mp_event": record["event"]}
properties = record["properties"]
for result in transform_property_names(properties.keys()):
# Convert all values to string (this is default property type)
# because API does not provide properties type information
item[result.transformed_name] = str(properties[result.source_name])

# convert timestamp to datetime string
item["time"] = pendulum.from_timestamp(int(item["time"]), tz="UTC").to_iso8601_string()
if "time" in item: # time is not always present in the response
item["time"] = pendulum.from_timestamp(int(item["time"]), tz="UTC").to_iso8601_string()

yield item

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"UserEntityAccess",
"UserFieldAccess",
"Vote",
"FlowTestView",
]

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

# The following objects are not supported by the Bulk API. Listed objects are version specific.
Expand Down Expand Up @@ -177,6 +179,7 @@
"AccountBrandShare",
"AccountFeed",
"AssetFeed",
"WorkStepStatus",
]

UNSUPPORTED_FILTERING_STREAMS = [
Expand All @@ -199,6 +202,8 @@
"ReportEvent",
"TabDefinition",
"UriEvent",
"PermissionSetEventStore",
"ActivityFieldHistory",
]

RESOURCE_PRIMARY_KEY_MAP = {
Expand All @@ -210,7 +215,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"]
UNSUPPORTED_STREAMS = ["ActivityMetric", "ActivityMetricRollup", "PromotionTarget", "PromotionQualifier"]


class Salesforce:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ connectionSpecification:
pattern: >-
^([0-9]{4}-[0-9]{2}-[0-9]{2}(T[0-9]{2}:[0-9]{2}:[0-9]{2}Z)?)$
examples:
- "2021-07-25"
- "2021-07-25T00:00:00Z"
format: date-time
order: 5
Expand Down

0 comments on commit dd4e92c

Please sign in to comment.