airbyte-source-google-search-console 1.5.15__py3-none-any.whl → 1.5.16.dev202503142015__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {airbyte_source_google_search_console-1.5.15.dist-info → airbyte_source_google_search_console-1.5.16.dev202503142015.dist-info}/METADATA +1 -1
- {airbyte_source_google_search_console-1.5.15.dist-info → airbyte_source_google_search_console-1.5.16.dev202503142015.dist-info}/RECORD +5 -5
- source_google_search_console/streams.py +54 -1
- {airbyte_source_google_search_console-1.5.15.dist-info → airbyte_source_google_search_console-1.5.16.dev202503142015.dist-info}/WHEEL +0 -0
- {airbyte_source_google_search_console-1.5.15.dist-info → airbyte_source_google_search_console-1.5.16.dev202503142015.dist-info}/entry_points.txt +0 -0
@@ -19,8 +19,8 @@ source_google_search_console/schemas/sites.json,sha256=WNiCRuStPL1YkJiFa8FEbNJmq
|
|
19
19
|
source_google_search_console/service_account_authenticator.py,sha256=gjUxt0xFxj82uviCQNTsA1Jlee__UDhYNjE7bRO1G0U,1227
|
20
20
|
source_google_search_console/source.py,sha256=8n10_agSa2rvPvEyBvOfOpmpEardbEhi3H0vlK2A4_g,10002
|
21
21
|
source_google_search_console/spec.json,sha256=WYtFvaSqWYGm1Dt2yV9G92U78Q94rh9oarbxJe3H7xo,8470
|
22
|
-
source_google_search_console/streams.py,sha256=
|
23
|
-
airbyte_source_google_search_console-1.5.
|
24
|
-
airbyte_source_google_search_console-1.5.
|
25
|
-
airbyte_source_google_search_console-1.5.
|
26
|
-
airbyte_source_google_search_console-1.5.
|
22
|
+
source_google_search_console/streams.py,sha256=argw9ECCf7nInvrg_B5BgWa59gqL_ecvpFGbWf6tCsE,22275
|
23
|
+
airbyte_source_google_search_console-1.5.16.dev202503142015.dist-info/METADATA,sha256=VPW3sTOMZUXbxtWilCnJ1rGS59MEmx5_orqs4Mh1fGM,5646
|
24
|
+
airbyte_source_google_search_console-1.5.16.dev202503142015.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
25
|
+
airbyte_source_google_search_console-1.5.16.dev202503142015.dist-info/entry_points.txt,sha256=DMcgc9bCX-Vt6hm_68pa77qS3eGdeMhg-UdlFc-XKUM,85
|
26
|
+
airbyte_source_google_search_console-1.5.16.dev202503142015.dist-info/RECORD,,
|
@@ -371,6 +371,20 @@ class SearchAppearance(SearchAnalytics):
|
|
371
371
|
primary_key = None
|
372
372
|
dimensions = ["searchAppearance"]
|
373
373
|
|
374
|
+
def request_body_json(
|
375
|
+
self,
|
376
|
+
stream_state: Mapping[str, Any] = None,
|
377
|
+
stream_slice: Mapping[str, Any] = None,
|
378
|
+
next_page_token: Mapping[str, Any] = None,
|
379
|
+
) -> Optional[Union[Dict[str, Any], str]]:
|
380
|
+
data = super().request_body_json(stream_state, stream_slice, next_page_token)
|
381
|
+
|
382
|
+
fields_to_remove = ["aggregationType", "startRow", "rowLimit", "dataState"]
|
383
|
+
for field in fields_to_remove:
|
384
|
+
data.pop(field, None)
|
385
|
+
|
386
|
+
return data
|
387
|
+
|
374
388
|
|
375
389
|
class SearchByKeyword(SearchAnalytics):
|
376
390
|
"""
|
@@ -381,12 +395,14 @@ class SearchByKeyword(SearchAnalytics):
|
|
381
395
|
filters: {"dimension": "searchAppearance", "operator": "equals", "expression": keyword}
|
382
396
|
"""
|
383
397
|
|
398
|
+
search_types = ["web", "news", "image", "video", "discover", "googleNews"]
|
399
|
+
|
384
400
|
def stream_slices(
|
385
401
|
self, sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None
|
386
402
|
) -> Iterable[Optional[Mapping[str, Any]]]:
|
387
403
|
search_appearance_stream = SearchAppearance(self._session.auth, self._site_urls, self._start_date, self._end_date)
|
388
404
|
|
389
|
-
for stream_slice in super().stream_slices(sync_mode, cursor_field, stream_state):
|
405
|
+
for stream_slice in super().stream_slices(sync_mode, cursor_field, stream_state):
|
390
406
|
keywords_records = search_appearance_stream.read_records(
|
391
407
|
sync_mode=SyncMode.full_refresh, stream_state=stream_state, stream_slice=stream_slice
|
392
408
|
)
|
@@ -395,6 +411,7 @@ class SearchByKeyword(SearchAnalytics):
|
|
395
411
|
for keyword in keywords:
|
396
412
|
filters = {"dimension": "searchAppearance", "operator": "equals", "expression": keyword}
|
397
413
|
stream_slice["dimensionFilterGroups"] = [{"groupType": "and", "filters": filters}]
|
414
|
+
stream_slice["dimensions"] = self.dimensions
|
398
415
|
|
399
416
|
yield stream_slice
|
400
417
|
|
@@ -412,6 +429,18 @@ class SearchByKeyword(SearchAnalytics):
|
|
412
429
|
class SearchAnalyticsKeywordPageReport(SearchByKeyword):
|
413
430
|
primary_key = ["site_url", "date", "country", "device", "query", "page", "search_type"]
|
414
431
|
dimensions = ["date", "country", "device", "query", "page"]
|
432
|
+
def stream_slices(
|
433
|
+
self, sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None
|
434
|
+
) -> Iterable[Optional[Mapping[str, Any]]]:
|
435
|
+
return super(SearchByKeyword, self).stream_slices(sync_mode, cursor_field, stream_state)
|
436
|
+
|
437
|
+
def request_body_json(
|
438
|
+
self,
|
439
|
+
stream_state: Mapping[str, Any] = None,
|
440
|
+
stream_slice: Mapping[str, Any] = None,
|
441
|
+
next_page_token: Mapping[str, Any] = None,
|
442
|
+
) -> Optional[Union[Dict[str, Any], str]]:
|
443
|
+
return super(SearchByKeyword, self).request_body_json(stream_state, stream_slice, next_page_token)
|
415
444
|
|
416
445
|
|
417
446
|
class SearchAnalyticsKeywordSiteReportByPage(SearchByKeyword):
|
@@ -419,11 +448,35 @@ class SearchAnalyticsKeywordSiteReportByPage(SearchByKeyword):
|
|
419
448
|
dimensions = ["date", "country", "device", "query"]
|
420
449
|
aggregation_type = QueryAggregationType.by_page
|
421
450
|
|
451
|
+
def stream_slices(self, sync_mode, cursor_field=None, stream_state=None):
|
452
|
+
for stream_slice in super(SearchByKeyword, self).stream_slices(sync_mode, cursor_field, stream_state):
|
453
|
+
yield stream_slice
|
454
|
+
|
455
|
+
def request_body_json(
|
456
|
+
self,
|
457
|
+
stream_state: Mapping[str, Any] = None,
|
458
|
+
stream_slice: Mapping[str, Any] = None,
|
459
|
+
next_page_token: Mapping[str, Any] = None,
|
460
|
+
) -> Optional[Union[Dict[str, Any], str]]:
|
461
|
+
return super(SearchByKeyword, self).request_body_json(stream_state, stream_slice, next_page_token)
|
422
462
|
|
423
463
|
class SearchAnalyticsKeywordSiteReportBySite(SearchByKeyword):
|
424
464
|
primary_key = ["site_url", "date", "country", "device", "query", "search_type"]
|
425
465
|
dimensions = ["date", "country", "device", "query"]
|
426
466
|
aggregation_type = QueryAggregationType.by_property
|
467
|
+
def stream_slices(
|
468
|
+
self, sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None
|
469
|
+
) -> Iterable[Optional[Mapping[str, Any]]]:
|
470
|
+
return super(SearchByKeyword, self).stream_slices(sync_mode, cursor_field, stream_state)
|
471
|
+
|
472
|
+
def request_body_json(
|
473
|
+
self,
|
474
|
+
stream_state: Mapping[str, Any] = None,
|
475
|
+
stream_slice: Mapping[str, Any] = None,
|
476
|
+
next_page_token: Mapping[str, Any] = None,
|
477
|
+
) -> Optional[Union[Dict[str, Any], str]]:
|
478
|
+
return super(SearchByKeyword, self).request_body_json(stream_state, stream_slice, next_page_token)
|
479
|
+
|
427
480
|
|
428
481
|
|
429
482
|
class SearchAnalyticsSiteReportBySite(SearchAnalytics):
|
File without changes
|