airbyte-source-google-search-console 1.7.0__py3-none-any.whl → 1.8.0__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.
@@ -3,14 +3,14 @@
3
3
  #
4
4
 
5
5
  import json
6
- from typing import Any, List, Mapping, Optional, Tuple, Union
6
+ from typing import Any, List, Mapping, Optional, Union
7
7
  from urllib.parse import urlparse
8
8
 
9
9
  import jsonschema
10
10
  import pendulum
11
11
  import requests
12
12
 
13
- from airbyte_cdk.models import ConfiguredAirbyteCatalog, FailureType, SyncMode
13
+ from airbyte_cdk.models import ConfiguredAirbyteCatalog, FailureType
14
14
  from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource
15
15
  from airbyte_cdk.sources.source import TState
16
16
  from airbyte_cdk.sources.streams import Stream
@@ -23,15 +23,7 @@ from source_google_search_console.exceptions import (
23
23
  )
24
24
  from source_google_search_console.service_account_authenticator import ServiceAccountAuthenticator
25
25
  from source_google_search_console.streams import (
26
- SearchAnalyticsAllFields,
27
26
  SearchAnalyticsByCustomDimensions,
28
- SearchAnalyticsByDate,
29
- SearchAnalyticsByDevice,
30
- SearchAnalyticsByPage,
31
- SearchAnalyticsByQuery,
32
- SearchAnalyticsPageReport,
33
- SearchAnalyticsSiteReportByPage,
34
- SearchAnalyticsSiteReportBySite,
35
27
  )
36
28
 
37
29
 
@@ -147,18 +139,6 @@ class SourceGoogleSearchConsole(YamlDeclarativeSource):
147
139
 
148
140
  streams = super().streams(config=config)
149
141
 
150
- streams.extend(
151
- [
152
- SearchAnalyticsByDevice(**stream_config),
153
- SearchAnalyticsByDate(**stream_config),
154
- SearchAnalyticsByQuery(**stream_config),
155
- SearchAnalyticsByPage(**stream_config),
156
- SearchAnalyticsAllFields(**stream_config),
157
- SearchAnalyticsPageReport(**stream_config),
158
- SearchAnalyticsSiteReportBySite(**stream_config),
159
- SearchAnalyticsSiteReportByPage(**stream_config),
160
- ]
161
- )
162
142
  streams = streams + self.get_custom_reports(config=config, stream_config=stream_config)
163
143
 
164
144
  return streams
@@ -158,6 +158,15 @@
158
158
  "default": "final",
159
159
  "order": 6
160
160
  },
161
+ "num_workers": {
162
+ "type": "integer",
163
+ "title": "Number of concurrent workers",
164
+ "minimum": 2,
165
+ "maximum": 100,
166
+ "default": 40,
167
+ "examples": [30, 40, 50],
168
+ "description": "The number of worker threads to use for the sync. For more details on Google Search Console rate limits, refer to the <a href=\"https://developers.google.com/webmaster-tools/limits\">docs</a>."
169
+ },
161
170
  "always_use_aggregation_type_auto": {
162
171
  "type": "boolean",
163
172
  "title": "Always Use Aggregation Type Auto",
@@ -294,53 +294,6 @@ class SearchAnalytics(GoogleSearchConsole, CheckpointMixin, ABC):
294
294
  yield record
295
295
 
296
296
 
297
- class SearchAnalyticsByDate(SearchAnalytics):
298
- primary_key = ["site_url", "date", "search_type"]
299
- search_types = ["web", "news", "image", "video", "discover", "googleNews"]
300
- dimensions = ["date"]
301
-
302
-
303
- class SearchAnalyticsByDevice(SearchAnalytics):
304
- primary_key = ["site_url", "date", "device", "search_type"]
305
- search_types = ["web", "news", "image", "video", "googleNews"]
306
- dimensions = ["date", "device"]
307
-
308
-
309
- class SearchAnalyticsByPage(SearchAnalytics):
310
- primary_key = ["site_url", "date", "page", "search_type"]
311
- search_types = ["web", "news", "image", "video", "discover", "googleNews"]
312
- dimensions = ["date", "page"]
313
-
314
-
315
- class SearchAnalyticsByQuery(SearchAnalytics):
316
- primary_key = ["site_url", "date", "query", "search_type"]
317
- dimensions = ["date", "query"]
318
-
319
-
320
- class SearchAnalyticsAllFields(SearchAnalytics):
321
- primary_key = ["site_url", "date", "country", "device", "query", "page", "search_type"]
322
- dimensions = ["date", "country", "device", "page", "query"]
323
-
324
-
325
- class SearchAnalyticsSiteReportBySite(SearchAnalytics):
326
- primary_key = ["site_url", "date", "country", "device", "search_type"]
327
- dimensions = ["date", "country", "device"]
328
- aggregation_type = QueryAggregationType.by_property
329
-
330
-
331
- class SearchAnalyticsSiteReportByPage(SearchAnalytics):
332
- primary_key = ["site_url", "date", "country", "device", "search_type"]
333
- search_types = ["web", "news", "image", "video", "googleNews"]
334
- dimensions = ["date", "country", "device"]
335
- aggregation_type = QueryAggregationType.by_page
336
-
337
-
338
- class SearchAnalyticsPageReport(SearchAnalytics):
339
- primary_key = ["site_url", "date", "country", "device", "search_type", "page"]
340
- search_types = ["web", "news", "image", "video", "googleNews"]
341
- dimensions = ["date", "country", "device", "page"]
342
-
343
-
344
297
  class SearchAnalyticsByCustomDimensions(SearchAnalytics):
345
298
  # `date` is a cursor field therefore should be mandatory
346
299
  DEFAULT_DIMENSIONS = ["date"]
@@ -1,22 +0,0 @@
1
- source_google_search_console/__init__.py,sha256=HQCPu-CK7XmVDtP9rmTdB2XyraVCc6pv9pw38-O8y48,1191
2
- source_google_search_console/components.py,sha256=5o8kH2xwYUvk3yjnSd6okJVF2KBUqUIF4V97xRpPAyI,2803
3
- source_google_search_console/config_migrations.py,sha256=Cl4SUdJpAf6wMM_vVhqjjU89NfUq9LIGJ9zNrWiBk-A,4235
4
- source_google_search_console/exceptions.py,sha256=iD3jYC4WxVCEKGsqQ7Vaj1tbjhJZ4S5mnSDnwFJdsIQ,1097
5
- source_google_search_console/manifest.yaml,sha256=m6IhF4bRwF9nAivJev2ebB8QPvoKRbYixF-5ZKSBkms,25882
6
- source_google_search_console/run.py,sha256=TBkPlseTERarkj6wL8AMEKgm5Xsb2drnltPVH6257-M,2195
7
- source_google_search_console/schemas/search_analytics_all_fields.json,sha256=iQxRh_c_yz3uGofqpo1KX571TMmzYjKScb0PtI6SN_Q,1729
8
- source_google_search_console/schemas/search_analytics_by_date.json,sha256=meCbWDayc1y0q-Lu-CAdjQVnsM8xZBX3BdF129UC1P8,1388
9
- source_google_search_console/schemas/search_analytics_by_device.json,sha256=VtoFjmmv9rx-uhSFaRn0wm4LeSxRIaexrxg2Spvbneo,1525
10
- source_google_search_console/schemas/search_analytics_by_page.json,sha256=KyUojZc4Lv3hPswxIJzUL5QDNsbvSugGjl_uHGF7Am4,1473
11
- source_google_search_console/schemas/search_analytics_by_query.json,sha256=mYc1Fu1A5TWLZCApZSjjfs_urW5BRUCPQI3rw3yQjt4,1439
12
- source_google_search_console/schemas/search_analytics_page_report.json,sha256=-b0Y0LenTchS0q9A2aQ4hIjUjXkYF8erOtyrTMhf6MM,1776
13
- source_google_search_console/schemas/search_analytics_site_report_by_page.json,sha256=hWKHkm1reqGGu1dNcWBe6_XkZ5tK-UaiymrYRVgxRxI,1515
14
- source_google_search_console/schemas/search_analytics_site_report_by_site.json,sha256=rAh6LuNy7nCrrNM9MTd0qxAVc886ecQaqWRgV63OfyA,1408
15
- source_google_search_console/service_account_authenticator.py,sha256=pAWKAXfwfTY3xkXvQJH0EyFphFULdCIcC47YXYTO9X8,1307
16
- source_google_search_console/source.py,sha256=ddqYq3ZSNrVtGvuQQ5WnHgMLuf92AtumzdDKWGffwRo,8721
17
- source_google_search_console/spec.json,sha256=SensIrWvoie2aGwxmgoMYpq2jb3XP3F2myQWCVQ4db8,8980
18
- source_google_search_console/streams.py,sha256=yb78hGaKPDCJoFqPSun3lDhr8VhSxcLgXTLtX2ouVpY,15804
19
- airbyte_source_google_search_console-1.7.0.dist-info/METADATA,sha256=R-pJQZUfWv2duwzSFWta7vbn8V01TeESsaoRO5728mo,5621
20
- airbyte_source_google_search_console-1.7.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
21
- airbyte_source_google_search_console-1.7.0.dist-info/entry_points.txt,sha256=DMcgc9bCX-Vt6hm_68pa77qS3eGdeMhg-UdlFc-XKUM,85
22
- airbyte_source_google_search_console-1.7.0.dist-info/RECORD,,
@@ -1,53 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "properties": {
5
- "site_url": {
6
- "description": "The URL of the site from which the data originates.",
7
- "type": ["null", "string"]
8
- },
9
- "search_type": {
10
- "description": "The type of search (e.g., web, image, video) that triggered the search result.",
11
- "type": ["null", "string"]
12
- },
13
- "date": {
14
- "description": "The date when the search query occurred.",
15
- "type": ["null", "string"],
16
- "format": "date"
17
- },
18
- "country": {
19
- "description": "The country from which the search query originated.",
20
- "type": ["null", "string"]
21
- },
22
- "device": {
23
- "description": "The type of device used by the user (e.g., desktop, mobile).",
24
- "type": ["null", "string"]
25
- },
26
- "page": {
27
- "description": "The page URL that appeared in the search results.",
28
- "type": ["null", "string"]
29
- },
30
- "query": {
31
- "description": "The search query entered by the user.",
32
- "type": ["null", "string"]
33
- },
34
- "clicks": {
35
- "description": "The number of times users clicked on the search result for a specific query.",
36
- "type": ["null", "integer"]
37
- },
38
- "impressions": {
39
- "description": "The number of times a search result appeared in response to a query.",
40
- "type": ["null", "integer"]
41
- },
42
- "ctr": {
43
- "description": "Click-through rate, calculated as clicks divided by impressions.",
44
- "type": ["null", "number"],
45
- "multipleOf": 1e-25
46
- },
47
- "position": {
48
- "description": "The average position of the search result on the search engine results page.",
49
- "type": ["null", "number"],
50
- "multipleOf": 1e-25
51
- }
52
- }
53
- }
@@ -1,37 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "properties": {
5
- "site_url": {
6
- "description": "The URL of the site for which the search analytics data is being reported.",
7
- "type": ["null", "string"]
8
- },
9
- "search_type": {
10
- "description": "The type of search query (e.g., web, image, video) that generated the search analytics data.",
11
- "type": ["null", "string"]
12
- },
13
- "date": {
14
- "description": "The date for which the search analytics data is being reported.",
15
- "type": ["null", "string"],
16
- "format": "date"
17
- },
18
- "clicks": {
19
- "description": "The total number of times users clicked on the search result for the site URL on the specific date.",
20
- "type": ["null", "integer"]
21
- },
22
- "impressions": {
23
- "description": "The number of times the site URL was displayed in the search results to users on the specific date.",
24
- "type": ["null", "integer"]
25
- },
26
- "ctr": {
27
- "description": "The click-through rate (CTR) represents the percentage of total impressions that resulted in a click to the site URL.",
28
- "type": ["null", "number"],
29
- "multipleOf": 1e-25
30
- },
31
- "position": {
32
- "description": "The average position of the site URL in the search results pages for the specific date.",
33
- "type": ["null", "number"],
34
- "multipleOf": 1e-25
35
- }
36
- }
37
- }
@@ -1,41 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "properties": {
5
- "site_url": {
6
- "description": "The URL of the site for which search analytics data is being provided.",
7
- "type": ["null", "string"]
8
- },
9
- "search_type": {
10
- "description": "The type of search performed (e.g., web search, image search, video search).",
11
- "type": ["null", "string"]
12
- },
13
- "date": {
14
- "description": "The date for which the search analytics data is provided.",
15
- "type": ["null", "string"],
16
- "format": "date"
17
- },
18
- "device": {
19
- "description": "The type of device used by the user for the search query (e.g., desktop, mobile).",
20
- "type": ["null", "string"]
21
- },
22
- "clicks": {
23
- "description": "The total number of times a user clicked on a search result linking to the target site.",
24
- "type": ["null", "integer"]
25
- },
26
- "impressions": {
27
- "description": "The total number of times a user saw a link to the target site in search results.",
28
- "type": ["null", "integer"]
29
- },
30
- "ctr": {
31
- "description": "Click-through rate represents the ratio of clicks to impressions, showing the effectiveness of your site in attracting clicks from search results.",
32
- "type": ["null", "number"],
33
- "multipleOf": 1e-25
34
- },
35
- "position": {
36
- "description": "The average position of the site's URLs in search results for the given query or queries.",
37
- "type": ["null", "number"],
38
- "multipleOf": 1e-25
39
- }
40
- }
41
- }
@@ -1,41 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "properties": {
5
- "site_url": {
6
- "description": "The URL of the site for which the search analytics data is being reported.",
7
- "type": ["null", "string"]
8
- },
9
- "search_type": {
10
- "description": "The type of search query that led to the page being displayed in search results.",
11
- "type": ["null", "string"]
12
- },
13
- "date": {
14
- "description": "The date for which the search analytics data is reported.",
15
- "type": ["null", "string"],
16
- "format": "date"
17
- },
18
- "page": {
19
- "description": "The URL of the specific page being analyzed for search analytics data.",
20
- "type": ["null", "string"]
21
- },
22
- "clicks": {
23
- "description": "The number of times a user clicked on the search result linking to the page.",
24
- "type": ["null", "integer"]
25
- },
26
- "impressions": {
27
- "description": "The number of times a page from the site appeared in the search results viewed by users.",
28
- "type": ["null", "integer"]
29
- },
30
- "ctr": {
31
- "description": "Click-through rate (CTR) is the ratio of clicks to impressions, indicating the effectiveness of the page in generating clicks.",
32
- "type": ["null", "number"],
33
- "multipleOf": 1e-25
34
- },
35
- "position": {
36
- "description": "The average position at which the page appeared in search results.",
37
- "type": ["null", "number"],
38
- "multipleOf": 1e-25
39
- }
40
- }
41
- }
@@ -1,41 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "properties": {
5
- "site_url": {
6
- "description": "The URL of the site for which the search analytics data is captured.",
7
- "type": ["null", "string"]
8
- },
9
- "search_type": {
10
- "description": "The type of search result (e.g., web, image, video) for the specific query.",
11
- "type": ["null", "string"]
12
- },
13
- "date": {
14
- "description": "The date for which the search analytics data is recorded.",
15
- "type": ["null", "string"],
16
- "format": "date"
17
- },
18
- "query": {
19
- "description": "The search query for which the search analytics data is recorded.",
20
- "type": ["null", "string"]
21
- },
22
- "clicks": {
23
- "description": "The number of times users clicked on the search result for the specific query.",
24
- "type": ["null", "integer"]
25
- },
26
- "impressions": {
27
- "description": "The number of times the search result was displayed for the specific query.",
28
- "type": ["null", "integer"]
29
- },
30
- "ctr": {
31
- "description": "The click-through rate (percentage) for the specific query, calculated as clicks divided by impressions.",
32
- "type": ["null", "number"],
33
- "multipleOf": 1e-25
34
- },
35
- "position": {
36
- "description": "The average position at which the search result appeared for the specific query.",
37
- "type": ["null", "number"],
38
- "multipleOf": 1e-25
39
- }
40
- }
41
- }
@@ -1,50 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "additionalProperties": true,
5
- "properties": {
6
- "site_url": {
7
- "description": "The URL of the website for which the search analytics data is being reported.",
8
- "type": ["null", "string"]
9
- },
10
- "search_type": {
11
- "description": "The type of search (e.g., web, image, video) that led users to the website.",
12
- "type": ["null", "string"]
13
- },
14
- "date": {
15
- "description": "The date when the search data was recorded.",
16
- "type": ["null", "string"],
17
- "format": "date"
18
- },
19
- "country": {
20
- "description": "The country from which the search originated.",
21
- "type": ["null", "string"]
22
- },
23
- "page": {
24
- "description": "The specific page URL within the website that appeared in search results.",
25
- "type": ["null", "string"]
26
- },
27
- "device": {
28
- "description": "The type of device used by the user for the search query (e.g., desktop, mobile).",
29
- "type": ["null", "string"]
30
- },
31
- "clicks": {
32
- "description": "The total number of times users clicked on search results that led to the linked website.",
33
- "type": ["null", "integer"]
34
- },
35
- "impressions": {
36
- "description": "The total number of times a search result from the linked website was shown to users.",
37
- "type": ["null", "integer"]
38
- },
39
- "ctr": {
40
- "description": "Click-through rate: The percentage of clicks out of the total impressions for a given search query.",
41
- "type": ["null", "number"],
42
- "multipleOf": 1e-25
43
- },
44
- "position": {
45
- "description": "The average position at which the website's search results appeared to users.",
46
- "type": ["null", "number"],
47
- "multipleOf": 1e-25
48
- }
49
- }
50
- }
@@ -1,46 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "additionalProperties": true,
5
- "properties": {
6
- "site_url": {
7
- "description": "The URL of the page on the site that is being reported.",
8
- "type": ["null", "string"]
9
- },
10
- "search_type": {
11
- "description": "The type of search query that led to the page being shown.",
12
- "type": ["null", "string"]
13
- },
14
- "date": {
15
- "description": "The date for which the data is being reported.",
16
- "type": ["null", "string"],
17
- "format": "date"
18
- },
19
- "country": {
20
- "description": "The country from which the search traffic originated.",
21
- "type": ["null", "string"]
22
- },
23
- "device": {
24
- "description": "The type of device used by the searcher (e.g., desktop, mobile).",
25
- "type": ["null", "string"]
26
- },
27
- "clicks": {
28
- "description": "The total number of clicks received by the page from search results.",
29
- "type": ["null", "integer"]
30
- },
31
- "impressions": {
32
- "description": "The total number of times the page appeared in search results.",
33
- "type": ["null", "integer"]
34
- },
35
- "ctr": {
36
- "description": "The click-through rate, i.e., the percentage of total impressions that resulted in clicks.",
37
- "type": ["null", "number"],
38
- "multipleOf": 1e-25
39
- },
40
- "position": {
41
- "description": "The average position at which the page appeared in search results.",
42
- "type": ["null", "number"],
43
- "multipleOf": 1e-25
44
- }
45
- }
46
- }
@@ -1,46 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft-07/schema#",
3
- "type": "object",
4
- "additionalProperties": true,
5
- "properties": {
6
- "site_url": {
7
- "description": "The URL of the site being analyzed",
8
- "type": ["null", "string"]
9
- },
10
- "search_type": {
11
- "description": "The type of search (e.g., web, image, video)",
12
- "type": ["null", "string"]
13
- },
14
- "date": {
15
- "description": "The date of the search analytics data",
16
- "type": ["null", "string"],
17
- "format": "date"
18
- },
19
- "country": {
20
- "description": "The country where the search took place",
21
- "type": ["null", "string"]
22
- },
23
- "device": {
24
- "description": "The type of device used for the search (e.g., mobile, desktop)",
25
- "type": ["null", "string"]
26
- },
27
- "clicks": {
28
- "description": "The number of times users clicked on a search result linking to the site",
29
- "type": ["null", "integer"]
30
- },
31
- "impressions": {
32
- "description": "The number of times the site appeared in search results",
33
- "type": ["null", "integer"]
34
- },
35
- "ctr": {
36
- "description": "Click-through rate calculated as clicks divided by impressions",
37
- "type": ["null", "number"],
38
- "multipleOf": 1e-25
39
- },
40
- "position": {
41
- "description": "The average position of the site in search results",
42
- "type": ["null", "number"],
43
- "multipleOf": 1e-25
44
- }
45
- }
46
- }