Closed ttakizawa closed 2 years ago
According to docs this metric bidPlus CAN be used for: Ad type: Sponsored Products Record types: campaigns url: https://advertising-api-test.amazon.com/v2/sp/campaigns/report
It's not clear why Amazon Ads API response with error:
{"code":"400","details":"Unsupported metric bidPlus","requestId":"486PQPQZYJ28VPDMZBX1"}
Probably we need to create jira issue here https://amzn-clicks.atlassian.net/servicedesk/customer/portal/2/group/2 to continue to investigate
What is also interesting if we use really non-existent metric notfound
we got another error message:
{"code":"422","details":"Unrecognized metric: notfound\\n at [Source:","requestId":"HSQ4CXY4VAG87YJCS9CN"}
For now all looks like amazon SANDBOX pretty buggy and a lot of things does not work on SANDBOX region.
Stream sponsored_products_report_stream
only works under "Test account"
https://advertising.amazon.com/API/docs/en-us/test-accounts/overview
@ttakizawa if it ok with you, please close this issue
@ttakizawa can we close this issue ?
LOG
``` 2022-03-08 02:16:14 [32mINFO[m i.a.w.w.WorkerRun(call):49 - Executing worker wrapper. Airbyte version: 0.35.45-alpha 2022-03-08 02:16:14 [32mINFO[m i.a.w.t.TemporalAttemptExecution(get):105 - Docker volume job log path: /tmp/workspace/15/2/logs.log 2022-03-08 02:16:14 [32mINFO[m i.a.w.t.TemporalAttemptExecution(get):110 - Executing worker wrapper. Airbyte version: 0.35.45-alpha 2022-03-08 02:16:14 [32mINFO[m i.a.w.DefaultReplicationWorker(run):103 - start sync worker. job id: 15 attempt id: 2 2022-03-08 02:16:14 [32mINFO[m i.a.w.DefaultReplicationWorker(run):115 - configured sync modes: {null.sponsored_products_report_stream=full_refresh - append} 2022-03-08 02:16:14 [32mINFO[m i.a.w.p.a.DefaultAirbyteDestination(start):69 - Running destination... 2022-03-08 02:16:14 [32mINFO[m i.a.c.i.LineGobbler(voidCall):82 - Checking if airbyte/destination-bigquery:0.6.10 exists... 2022-03-08 02:16:14 [32mINFO[m i.a.c.i.LineGobbler(voidCall):82 - airbyte/destination-bigquery:0.6.10 was found locally. 2022-03-08 02:16:14 [32mINFO[m i.a.w.p.DockerProcessFactory(create):104 - Creating docker job ID: 15 2022-03-08 02:16:14 [32mINFO[m i.a.w.p.DockerProcessFactory(create):155 - Preparing command: docker run --rm --init -i -w /data/15/2 --log-driver none --network host -v airbyte_workspace:/data -v /tmp/airbyte_local:/local airbyte/destination-bigquery:0.6.10 write --config destination_config.json --catalog destination_catalog.json 2022-03-08 02:16:14 [32mINFO[m i.a.c.i.LineGobbler(voidCall):82 - Checking if airbyte/source-amazon-ads:0.1.3 exists... 2022-03-08 02:16:14 [32mINFO[m i.a.c.i.LineGobbler(voidCall):82 - airbyte/source-amazon-ads:0.1.3 was found locally. 2022-03-08 02:16:14 [32mINFO[m i.a.w.p.DockerProcessFactory(create):104 - Creating docker job ID: 15 2022-03-08 02:16:14 [32mINFO[m i.a.w.p.DockerProcessFactory(create):155 - Preparing command: docker run --rm --init -i -w /data/15/2 --log-driver none --network host -v airbyte_workspace:/data -v /tmp/airbyte_local:/local airbyte/source-amazon-ads:0.1.3 read --config source_config.json --catalog source_catalog.json --state input_state.json 2022-03-08 02:16:14 [32mINFO[m i.a.w.DefaultReplicationWorker(lambda$getDestinationOutputRunnable$6):338 - Destination output thread started. 2022-03-08 02:16:14 [32mINFO[m i.a.w.DefaultReplicationWorker(run):157 - Waiting for source and destination threads to complete. 2022-03-08 02:16:14 [32mINFO[m i.a.w.DefaultReplicationWorker(lambda$getReplicationRunnable$5):278 - Replication thread started. 2022-03-08 02:16:15 [43mdestination[0m > SLF4J: Class path contains multiple SLF4J bindings. 2022-03-08 02:16:15 [43mdestination[0m > SLF4J: Found binding in [jar:file:/airbyte/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] 2022-03-08 02:16:15 [43mdestination[0m > SLF4J: Found binding in [jar:file:/airbyte/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class] 2022-03-08 02:16:15 [43mdestination[0m > SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 2022-03-08 02:16:15 [43mdestination[0m > SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] 2022-03-08 02:16:15 [44msource[0m > Starting syncing SourceAmazonAds 2022-03-08 02:16:16 [43mdestination[0m > 2022-03-08 02:16:16 [32mINFO[m i.a.i.b.IntegrationCliParser(parseOptions):118 - integration args: {catalog=destination_catalog.json, write=null, config=destination_config.json} 2022-03-08 02:16:17 [43mdestination[0m > 2022-03-08 02:16:17 [32mINFO[m i.a.i.b.IntegrationRunner(run):88 - Sentry transaction event: 9ab31a4336cd4c4cbc94b8b48efde362 2022-03-08 02:16:17 [43mdestination[0m > 2022-03-08 02:16:17 [32mINFO[m i.a.i.b.IntegrationRunner(runInternal):106 - Running integration: io.airbyte.integrations.destination.bigquery.BigQueryDestination 2022-03-08 02:16:17 [43mdestination[0m > 2022-03-08 02:16:17 [32mINFO[m i.a.i.b.IntegrationRunner(runInternal):107 - Command: WRITE 2022-03-08 02:16:17 [43mdestination[0m > 2022-03-08 02:16:17 [32mINFO[m i.a.i.b.IntegrationRunner(runInternal):108 - Integration config: IntegrationConfig{command=WRITE, configPath='destination_config.json', catalogPath='destination_catalog.json', statePath='null'} 2022-03-08 02:16:17 [43mdestination[0m > 2022-03-08 02:16:17 [33mWARN[m c.n.s.JsonMetaSchema(newValidator):338 - Unknown keyword examples - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword 2022-03-08 02:16:17 [43mdestination[0m > 2022-03-08 02:16:17 [33mWARN[m c.n.s.JsonMetaSchema(newValidator):338 - Unknown keyword airbyte_secret - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword 2022-03-08 02:16:17 [43mdestination[0m > 2022-03-08 02:16:17 [32mINFO[m i.a.i.d.b.BigQueryUtils(getLoadingMethod):283 - Selected loading method is set to: STANDARD 2022-03-08 02:16:18 [44msource[0m > Syncing stream: sponsored_products_report_stream 2022-03-08 02:16:19 [44msource[0m > Initiating report generation for 75718738545707 profile with campaigns type for 20220228 date 2022-03-08 02:16:19 [44msource[0m > Backing off _init_reports(...) for 0.4s (source_amazon_ads.streams.report_streams.report_streams.ReportInitFailure: Unexpected HTTP status code 400 when registering campaigns, SponsoredProductsReportStream for 75718738545707 profile: {"code":"400","details":"Unsupported metric bidPlus","requestId":"WDF32TXJ7V329WN6KHE3"}) 2022-03-08 02:16:19 [43mdestination[0m > 2022-03-08 02:16:19 [32mINFO[m i.a.i.d.b.BigQueryUtils(createPartitionedTable):123 - Partitioned Table: GenericData{classInfo=[datasetId, projectId, tableId], {datasetId=airbyte, tableId=_airbyte_tmp_gcj_sponsored_products_report_stream}} created successfully 2022-03-08 02:16:20 [44msource[0m > Initiating report generation for 75718738545707 profile with campaigns type for 20220228 date 2022-03-08 02:16:20 [44msource[0m > Backing off _init_reports(...) for 1.8s (source_amazon_ads.streams.report_streams.report_streams.ReportInitFailure: Unexpected HTTP status code 400 when registering campaigns, SponsoredProductsReportStream for 75718738545707 profile: {"code":"400","details":"Unsupported metric bidPlus","requestId":"VYX5QCF6ZJQTHJ43CSXF"}) 2022-03-08 02:16:22 [44msource[0m > Initiating report generation for 75718738545707 profile with campaigns type for 20220228 date 2022-03-08 02:16:22 [44msource[0m > Backing off _init_reports(...) for 3.1s (source_amazon_ads.streams.report_streams.report_streams.ReportInitFailure: Unexpected HTTP status code 400 when registering campaigns, SponsoredProductsReportStream for 75718738545707 profile: {"code":"400","details":"Unsupported metric bidPlus","requestId":"34BQNHF89D41PQSDP1R6"}) 2022-03-08 02:16:25 [44msource[0m > Initiating report generation for 75718738545707 profile with campaigns type for 20220228 date 2022-03-08 02:16:25 [44msource[0m > Backing off _init_reports(...) for 7.8s (source_amazon_ads.streams.report_streams.report_streams.ReportInitFailure: Unexpected HTTP status code 400 when registering campaigns, SponsoredProductsReportStream for 75718738545707 profile: {"code":"400","details":"Unsupported metric bidPlus","requestId":"A5X8RZCZ4EDNP8BT0K82"}) 2022-03-08 02:16:33 [44msource[0m > Initiating report generation for 75718738545707 profile with campaigns type for 20220228 date 2022-03-08 02:16:33 [44msource[0m > Giving up _init_reports(...) after 5 tries (source_amazon_ads.streams.report_streams.report_streams.ReportInitFailure: Unexpected HTTP status code 400 when registering campaigns, SponsoredProductsReportStream for 75718738545707 profile: {"code":"400","details":"Unsupported metric bidPlus","requestId":"HSV6F9W2B42P9EQNR2XN"}) 2022-03-08 02:16:33 [44msource[0m > /usr/local/lib/python3.7/site-packages/pendulum/pendulum.py:2086: PendulumDeprecationWarning: The add_timedelta() method will be removed in version 2.0. 2022-03-08 02:16:33 [44msource[0m > Encountered an exception while reading stream SourceAmazonAds Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/airbyte_cdk/sources/abstract_source.py", line 108, in read internal_config=internal_config, File "/usr/local/lib/python3.7/site-packages/airbyte_cdk/sources/abstract_source.py", line 141, in _read_stream for record in record_iterator: File "/usr/local/lib/python3.7/site-packages/airbyte_cdk/sources/abstract_source.py", line 213, in _read_full_refresh for record in records: File "/airbyte/integration_code/source_amazon_ads/streams/report_streams/report_streams.py", line 142, in read_records report_infos = self._init_and_try_read_records(report_date) File "/usr/local/lib/python3.7/site-packages/backoff/_sync.py", line 94, in retry ret = target(*args, **kwargs) File "/airbyte/integration_code/source_amazon_ads/streams/report_streams/report_streams.py", line 159, in _init_and_try_read_records report_infos = self._init_reports(report_date) File "/usr/local/lib/python3.7/site-packages/backoff/_sync.py", line 94, in retry ret = target(*args, **kwargs) File "/airbyte/integration_code/source_amazon_ads/streams/report_streams/report_streams.py", line 345, in _init_reports f"Unexpected HTTP status code {response.status_code} when registering {record_type}, {type(self).__name__} for {profile.profileId} profile: {response.text}" source_amazon_ads.streams.report_streams.report_streams.ReportInitFailure: Unexpected HTTP status code 400 when registering campaigns, SponsoredProductsReportStream for 75718738545707 profile: {"code":"400","details":"Unsupported metric bidPlus","requestId":"HSV6F9W2B42P9EQNR2XN"} 2022-03-08 02:16:33 [44msource[0m > return self.add_timedelta(other) 2022-03-08 02:16:33 [44msource[0m > Finished syncing SourceAmazonAds 2022-03-08 02:16:33 [44msource[0m > SourceAmazonAds runtimes: 2022-03-08 02:16:33 [44msource[0m > Unexpected HTTP status code 400 when registering campaigns, SponsoredProductsReportStream for 75718738545707 profile: {"code":"400","details":"Unsupported metric bidPlus","requestId":"HSV6F9W2B42P9EQNR2XN"} Traceback (most recent call last): File "/airbyte/integration_code/main.py", line 13, in