google-cloud-python
google-cloud-python copied to clipboard
400 Cannot have filter_partition dimension without specifying filter-partitions in the request
Getting this new error on the google-analytics-data package
tested with v0.14 and v0.18
code:
class ClientClass:
...
def check_dimension_compatibility(self, property_id, dimension):
request = CheckCompatibilityRequest(
property=f"properties/{property_id}",
dimensions=[Dimension(name=dimension.api_name)],
compatibility_filter="INCOMPATIBLE"
)
return self._make_request(request)
...
client = ClientClass()
res = client.check_dimension_compatibility(property_id, dimension)
traceback:
File "/opt/code/tap-ga4/tap_ga4/client.py", line 114, in check_dimension_compatibility
return self._make_request(request)
File "/usr/local/share/virtualenvs/tap-ga4/lib/python3.8/site-packages/backoff/_sync.py", line 105, in retry
ret = target(*args, **kwargs)
File "/opt/code/tap-ga4/tap_ga4/client.py", line 51, in _make_request
return self.client.check_compatibility(request)
lib/python3.8/site-packages/google/analytics/data_v1beta/services/beta_analytics_data/client.py", line 1353, in check_compatibility
response = rpc(
File "/usr/local/share/virtualenvs/tap-ga4/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py", line 113, in __call__
return wrapped_func(*args, **kwargs)
File "/usr/local/share/virtualenvs/tap-ga4/lib/python3.8/site-packages/google/api_core/timeout.py", line 120, in func_with_timeout
return func(*args, **kwargs)
File "/usr/local/share/virtualenvs/tap-ga4/lib/python3.8/site-packages/google/api_core/grpc_helpers.py", line 74, in error_remapped_callable
raise exceptions.from_grpc_error(exc) from exc
google.api_core.exceptions.InvalidArgument: 400 Cannot have filter_partition dimension without specifying filter-partitions in the request.```