airbyte-source-google-ads 4.1.4.dev202511261340__tar.gz → 4.1.4.dev202512101647__tar.gz

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.
Files changed (16) hide show
  1. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/PKG-INFO +1 -1
  2. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/pyproject.toml +1 -1
  3. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/components.py +11 -0
  4. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/manifest.yaml +124 -8
  5. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/README.md +0 -0
  6. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/__init__.py +0 -0
  7. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/config_migrations.py +0 -0
  8. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/google_ads.py +0 -0
  9. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/models.py +0 -0
  10. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/run.py +0 -0
  11. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/schemas/customer_client.json +0 -0
  12. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/schemas/service_accounts.json +0 -0
  13. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/source.py +0 -0
  14. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/spec.json +0 -0
  15. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/streams.py +0 -0
  16. {airbyte_source_google_ads-4.1.4.dev202511261340 → airbyte_source_google_ads-4.1.4.dev202512101647}/source_google_ads/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-source-google-ads
3
- Version: 4.1.4.dev202511261340
3
+ Version: 4.1.4.dev202512101647
4
4
  Summary: Source implementation for Google Ads.
5
5
  Home-page: https://airbyte.com
6
6
  License: Elv2
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
3
3
  build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
- version = "4.1.4.dev.202511261340"
6
+ version = "4.1.4.dev.202512101647"
7
7
  name = "airbyte-source-google-ads"
8
8
  description = "Source implementation for Google Ads."
9
9
  authors = [ "Airbyte <contact@airbyte.io>",]
@@ -761,6 +761,17 @@ class CustomGAQueryHttpRequester(HttpRequester):
761
761
  return self.query[from_index + 4 :].strip()
762
762
 
763
763
 
764
+ class CustomGAQueryClickViewHttpRequester(CustomGAQueryHttpRequester):
765
+ @staticmethod
766
+ def _insert_segments_date_expr(query: GAQL, start_date: str, end_date: str) -> GAQL:
767
+ if "segments.date" not in query.fields:
768
+ query = query.append_field("segments.date")
769
+ condition = f"segments.date ='{start_date}'"
770
+ if query.where:
771
+ return query.set_where(query.where + " AND " + condition)
772
+ return query.set_where(condition)
773
+
774
+
764
775
  @dataclass()
765
776
  class CustomGAQuerySchemaLoader(SchemaLoader):
766
777
  """
@@ -1030,14 +1030,6 @@ definitions:
1030
1030
  )
1031
1031
  }}
1032
1032
  create_or_update: true
1033
- - type: ComponentMappingDefinition
1034
- field_path:
1035
- - retriever
1036
- - requester
1037
- - $parameters
1038
- - query
1039
- value: "{{ components_values.get('query', None) }}"
1040
- create_or_update: true
1041
1033
  - type: ComponentMappingDefinition
1042
1034
  field_path:
1043
1035
  - retriever
@@ -1085,6 +1077,130 @@ definitions:
1085
1077
  )
1086
1078
  }}
1087
1079
  create_or_update: true
1080
+ - type: ComponentMappingDefinition
1081
+ field_path:
1082
+ - incremental_sync
1083
+ - step
1084
+ value: "P1D"
1085
+ condition: >-
1086
+ {{
1087
+ (
1088
+ (
1089
+ components_values.get('query', '').count('segments.date') == 1
1090
+ and (components_values.get('query') | regex_search('(?i)(\\bSELECT\\b[\\s\\S]*?segments\\.date[\\s\\S]*?\\bFROM\\b)'))
1091
+ )
1092
+ or
1093
+ (
1094
+ components_values.get('query', '').count('segments.date') == 2
1095
+ and (components_values.get('query') | regex_search('(?i)(\\bSELECT\\b[\\s\\S]*?segments\\.date[\\s\\S]*?\\bFROM\\b)'))
1096
+ and (components_values.get('query') | regex_search('(?i)(\\bORDER\\s+BY\\b[\\s\\S]*?segments\\.date)'))
1097
+ )
1098
+ ) and components_values.get('query', '') | regex_search('(?i)(\\bFROM\\s+click_view\\b)')
1099
+ }}
1100
+ create_or_update: true
1101
+ - type: ComponentMappingDefinition
1102
+ field_path:
1103
+ - incremental_sync
1104
+ - start_datetime
1105
+ value: >-
1106
+ {
1107
+ "type": "MinMaxDatetime",
1108
+ "datetime": "{{ max(config.get('start_date', day_delta(-90, format='%Y-%m-%d')), day_delta(-90, format='%Y-%m-%d')) }}",
1109
+ "datetime_format": "%Y-%m-%d"
1110
+ }
1111
+ condition: >-
1112
+ {{
1113
+ (
1114
+ (
1115
+ components_values.get('query', '').count('segments.date') == 1
1116
+ and (components_values.get('query') | regex_search('(?i)(\\bSELECT\\b[\\s\\S]*?segments\\.date[\\s\\S]*?\\bFROM\\b)'))
1117
+ )
1118
+ or
1119
+ (
1120
+ components_values.get('query', '').count('segments.date') == 2
1121
+ and (components_values.get('query') | regex_search('(?i)(\\bSELECT\\b[\\s\\S]*?segments\\.date[\\s\\S]*?\\bFROM\\b)'))
1122
+ and (components_values.get('query') | regex_search('(?i)(\\bORDER\\s+BY\\b[\\s\\S]*?segments\\.date)'))
1123
+ )
1124
+ ) and components_values.get('query', '') | regex_search('(?i)(\\bFROM\\s+click_view\\b)')
1125
+ }}
1126
+ create_or_update: true
1127
+ - type: ComponentMappingDefinition
1128
+ field_path:
1129
+ - incremental_sync
1130
+ - end_datetime
1131
+ value: >-
1132
+ {
1133
+ "type": "MinMaxDatetime",
1134
+ "datetime": "{{ format_datetime((str_to_datetime(config.get('end_date')) if config.get('end_date') else now_utc()) + duration('P1D'), '%Y-%m-%d') }}",
1135
+ "datetime_format": "%Y-%m-%d"
1136
+ }
1137
+ condition: >-
1138
+ {{
1139
+ (
1140
+ (
1141
+ components_values.get('query', '').count('segments.date') == 1
1142
+ and (components_values.get('query') | regex_search('(?i)(\\bSELECT\\b[\\s\\S]*?segments\\.date[\\s\\S]*?\\bFROM\\b)'))
1143
+ )
1144
+ or
1145
+ (
1146
+ components_values.get('query', '').count('segments.date') == 2
1147
+ and (components_values.get('query') | regex_search('(?i)(\\bSELECT\\b[\\s\\S]*?segments\\.date[\\s\\S]*?\\bFROM\\b)'))
1148
+ and (components_values.get('query') | regex_search('(?i)(\\bORDER\\s+BY\\b[\\s\\S]*?segments\\.date)'))
1149
+ )
1150
+ ) and components_values.get('query', '') | regex_search('(?i)(\\bFROM\\s+click_view\\b)')
1151
+ }}
1152
+ create_or_update: true
1153
+ - type: ComponentMappingDefinition
1154
+ field_path:
1155
+ - incremental_sync
1156
+ - cursor_granularity
1157
+ value: P1D
1158
+ condition: >-
1159
+ {{
1160
+ (
1161
+ (
1162
+ components_values.get('query', '').count('segments.date') == 1
1163
+ and (components_values.get('query') | regex_search('(?i)(\\bSELECT\\b[\\s\\S]*?segments\\.date[\\s\\S]*?\\bFROM\\b)'))
1164
+ )
1165
+ or
1166
+ (
1167
+ components_values.get('query', '').count('segments.date') == 2
1168
+ and (components_values.get('query') | regex_search('(?i)(\\bSELECT\\b[\\s\\S]*?segments\\.date[\\s\\S]*?\\bFROM\\b)'))
1169
+ and (components_values.get('query') | regex_search('(?i)(\\bORDER\\s+BY\\b[\\s\\S]*?segments\\.date)'))
1170
+ )
1171
+ ) and components_values.get('query', '') | regex_search('(?i)(\\bFROM\\s+click_view\\b)')
1172
+ }}
1173
+ create_or_update: true
1174
+ - type: ComponentMappingDefinition
1175
+ field_path:
1176
+ - retriever
1177
+ - requester
1178
+ - class_name
1179
+ value: "source_google_ads.components.CustomGAQueryClickViewHttpRequester"
1180
+ condition: >-
1181
+ {{
1182
+ (
1183
+ (
1184
+ components_values.get('query', '').count('segments.date') == 1
1185
+ and (components_values.get('query') | regex_search('(?i)(\\bSELECT\\b[\\s\\S]*?segments\\.date[\\s\\S]*?\\bFROM\\b)'))
1186
+ )
1187
+ or
1188
+ (
1189
+ components_values.get('query', '').count('segments.date') == 2
1190
+ and (components_values.get('query') | regex_search('(?i)(\\bSELECT\\b[\\s\\S]*?segments\\.date[\\s\\S]*?\\bFROM\\b)'))
1191
+ and (components_values.get('query') | regex_search('(?i)(\\bORDER\\s+BY\\b[\\s\\S]*?segments\\.date)'))
1192
+ )
1193
+ ) and components_values.get('query', '') | regex_search('(?i)(\\bFROM\\s+click_view\\b)')
1194
+ }}
1195
+ create_or_update: true
1196
+ - type: ComponentMappingDefinition
1197
+ field_path:
1198
+ - retriever
1199
+ - requester
1200
+ - $parameters
1201
+ - query
1202
+ value: "{{ components_values.get('query', None) }}"
1203
+ create_or_update: true
1088
1204
  - type: ComponentMappingDefinition
1089
1205
  field_path:
1090
1206
  - retriever