airbyte-source-google-search-console 1.5.2__tar.gz → 1.5.4__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/PKG-INFO +1 -1
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/pyproject.toml +1 -1
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/streams.py +21 -10
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/README.md +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/__init__.py +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/config_migrations.py +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/exceptions.py +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/run.py +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/search_analytics_all_fields.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/search_analytics_by_country.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/search_analytics_by_date.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/search_analytics_by_device.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/search_analytics_by_page.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/search_analytics_by_query.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/search_analytics_keyword_page_report.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/search_analytics_keyword_site_report_by_page.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/search_analytics_keyword_site_report_by_site.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/search_analytics_page_report.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/search_analytics_site_report_by_page.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/search_analytics_site_report_by_site.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/sitemaps.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/schemas/sites.json +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/service_account_authenticator.py +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/source.py +0 -0
- {airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/source_google_search_console/spec.json +0 -0
@@ -374,8 +374,28 @@ class SearchByKeyword(SearchAnalytics):
|
|
374
374
|
"""
|
375
375
|
Adds searchAppearance value to dimensionFilterGroups in json body
|
376
376
|
https://developers.google.com/webmaster-tools/v1/how-tos/all-your-data#search-appearance-data
|
377
|
+
|
378
|
+
groupType: "and" - Whether all filters in this group must return true ("and"), or one or more must return true (not yet supported).
|
379
|
+
filters: {"dimension": "searchAppearance", "operator": "equals", "expression": keyword}
|
377
380
|
"""
|
378
381
|
|
382
|
+
def stream_slices(
|
383
|
+
self, sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None
|
384
|
+
) -> Iterable[Optional[Mapping[str, Any]]]:
|
385
|
+
search_appearance_stream = SearchAppearance(self._session.auth, self._site_urls, self._start_date, self._end_date)
|
386
|
+
|
387
|
+
for stream_slice in super().stream_slices(sync_mode, cursor_field, stream_state):
|
388
|
+
keywords_records = search_appearance_stream.read_records(
|
389
|
+
sync_mode=SyncMode.full_refresh, stream_state=stream_state, stream_slice=stream_slice
|
390
|
+
)
|
391
|
+
keywords = {record["searchAppearance"] for record in keywords_records}
|
392
|
+
|
393
|
+
for keyword in keywords:
|
394
|
+
filters = {"dimension": "searchAppearance", "operator": "equals", "expression": keyword}
|
395
|
+
stream_slice["dimensionFilterGroups"] = [{"groupType": "and", "filters": filters}]
|
396
|
+
|
397
|
+
yield stream_slice
|
398
|
+
|
379
399
|
def request_body_json(
|
380
400
|
self,
|
381
401
|
stream_state: Mapping[str, Any] = None,
|
@@ -383,16 +403,7 @@ class SearchByKeyword(SearchAnalytics):
|
|
383
403
|
next_page_token: Mapping[str, Any] = None,
|
384
404
|
) -> Optional[Union[Dict[str, Any], str]]:
|
385
405
|
data = super().request_body_json(stream_state, stream_slice, next_page_token)
|
386
|
-
|
387
|
-
stream = SearchAppearance(self._session.auth, self._site_urls, self._start_date, self._end_date)
|
388
|
-
keywords_records = stream.read_records(sync_mode=SyncMode.full_refresh, stream_state=stream_state, stream_slice=stream_slice)
|
389
|
-
keywords = {record["searchAppearance"] for record in keywords_records}
|
390
|
-
filters = []
|
391
|
-
for keyword in keywords:
|
392
|
-
filters.append({"dimension": "searchAppearance", "operator": "equals", "expression": keyword})
|
393
|
-
|
394
|
-
data["dimensionFilterGroups"] = [{"filters": filters}]
|
395
|
-
|
406
|
+
data["dimensionFilterGroups"] = stream_slice["dimensionFilterGroups"]
|
396
407
|
return data
|
397
408
|
|
398
409
|
|
{airbyte_source_google_search_console-1.5.2 → airbyte_source_google_search_console-1.5.4}/README.md
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|