Fixes https://github.com/airbytehq/oncall/issues/9565 ## What When migrating tolow-code + manifest-only format, we didn't migrate the dimensionFilter feature, this change adds this back so requests to Google's API include the dimension filter in the body of the request. ## How There are two things that are done now: 1. We take the incoming config and transform it into the format expected by Google's API. This is a direct port of what we used to do as a pre-sync transformation: https://github.com/airbytehq/airbyte/pull/60342/files#diff-c598765182c592504650290115e49900ef4b473307ddd69ea1662e6a6865cddfL206-L223 . This would also avoid a breaking change 2. Define in the stream template, the interpolation to inject the dimensionFilter (if it exists) into the request body which will be applied for each dynamic stream created by a custom_report ## Review guide 1. `components.py` 3. `manifest.yaml` ## User Impact Should only be additive and fix customers with the issue ## Can this PR be safely reverted and rolled back? - [x] YES 💚 - [ ] NO ❌
25 lines
639 B
Python
25 lines
639 B
Python
#
|
|
# Copyright (c) 2025 Airbyte, Inc., all rights reserved.
|
|
#
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
|
|
pytest_plugins = ["airbyte_cdk.test.utils.manifest_only_fixtures"]
|
|
|
|
|
|
def _get_manifest_path() -> Path:
|
|
source_declarative_manifest_path = Path("/airbyte/integration_code/source_declarative_manifest")
|
|
if source_declarative_manifest_path.exists():
|
|
return source_declarative_manifest_path
|
|
return Path(__file__).parent.parent
|
|
|
|
|
|
_SOURCE_FOLDER_PATH = _get_manifest_path()
|
|
_YAML_FILE_PATH = _SOURCE_FOLDER_PATH / "manifest.yaml"
|
|
|
|
sys.path.append(str(_SOURCE_FOLDER_PATH)) # to allow loading custom components
|