Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source Salesforce: remove ActivityMetric stream #20886

Merged
Expand Up @@ -1431,7 +1431,7 @@
- name: Salesforce
sourceDefinitionId: b117307c-14b6-41aa-9422-947e34922962
dockerRepository: airbyte/source-salesforce
dockerImageTag: 1.0.28
dockerImageTag: 1.0.29
documentationUrl: https://docs.airbyte.com/integrations/sources/salesforce
icon: salesforce.svg
sourceType: api
Expand Down
Expand Up @@ -12857,7 +12857,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-salesforce:1.0.28"
- dockerImage: "airbyte/source-salesforce:1.0.29"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/salesforce"
connectionSpecification:
Expand Down
Expand Up @@ -13,5 +13,5 @@ RUN pip install .

ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=1.0.28
LABEL io.airbyte.version=1.0.29
LABEL io.airbyte.name=airbyte/source-salesforce
Expand Up @@ -256,10 +256,13 @@ def get_validated_streams(self, config: Mapping[str, Any], catalog: ConfiguredAi
"""
stream_objects = {}
for stream_object in self.describe()["sobjects"]:
if stream_object["name"].lower() == "activitymetric":
self.logger.warning(f"Stream {stream_object['name']} can not be used without object ID therefore will be ignored.")
continue
if stream_object["queryable"]:
stream_objects[stream_object.pop("name")] = stream_object
else:
self.logger.warn(f"Stream {stream_object['name']} is not queryable and will be ignored.")
self.logger.warning(f"Stream {stream_object['name']} is not queryable and will be ignored.")

if catalog:
return {
Expand Down
Expand Up @@ -60,7 +60,7 @@ def test_discover_with_streams_criteria_param(streams_criteria, predicted_filter
assert sorted(filtered_streams.keys()) == sorted(predicted_filtered_streams)


def test_discover_only_queryable(stream_config):
def test_discovery_filter(stream_config):
sf_object = Salesforce(**stream_config)
sf_object.login = Mock()
sf_object.access_token = Mock()
Expand All @@ -69,6 +69,7 @@ def test_discover_only_queryable(stream_config):
return_value={
"sobjects": [
{"name": "Account", "queryable": True},
{"name": "ActivityMetric", "queryable": True},
{"name": "Leads", "queryable": False},
]
}
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/salesforce.md
Expand Up @@ -129,6 +129,7 @@ Now that you have set up the Salesforce source connector, check out the followin

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------|
| 1.0.29 | 2023-01-05 | [20886](https://github.com/airbytehq/airbyte/pull/20886) | Remove `ActivityMetric` stream |
| 1.0.28 | 2022-12-29 | [20927](https://github.com/airbytehq/airbyte/pull/20927) | Fix tests; add expected records |
| 1.0.27 | 2022-11-29 | [19869](https://github.com/airbytehq/airbyte/pull/19869) | Remove `AccountHistory` from unsupported BULK streams |
| 1.0.26 | 2022-11-15 | [19286](https://github.com/airbytehq/airbyte/pull/19286) | Bugfix: fallback to REST API if entity is not supported by BULK API |
Expand Down