peter_pezon
01/03/2023, 5:03 PMmeltano run ...
. I'm using tap-snowflake (transferwise) and target-duckdb. Process runs for ~6.5 hrs then crashes. Process is running in a detached screen shell on a k8s pod. I don't see a detailed error message. On one occasion, I saw a Forbidden error from tap-snowflake. I tried to replicate it. This time, process ends roughly the same way (after 6.5 hrs) but there is no error stack. Below log runs after a series of records are logged. The state bookmark is updated, but I'm not entirely sure that the records were actually inserted to duckdb. This is using meltano run ...
api with an inline stream mapper.
```2023-01-03T080954.845407Z [debug ] tail consumer is next block, wrapping up
2023-01-03T080954.845684Z [info ] time=2023-01-03 080954 name=target_duckdb level=INFO message=Loading 7758 rows into 'analytics."sales_invoice_v"' cmd_type=elb consumer=True name=target-duckdb-staging producer=False stdio=stderr string_id=target-duckdb-staging
2023-01-03T081004.630578Z [debug ] Added to state devtap snowflake sales invoice to target duckdb stagingcc state payload {'singer_state': {'currently_syncing': 'ANALYTICS-SALES_INVOICE_V', 'bookmarks': {'ANALYTICS-SALES_INVOICE_V': {'replication_key': 'UPDATED_TIMESTAMP', 'version': 1670361200499, 'replication_key_value': '2022-08-31T121649.583000+0000+0000'}}}}
2023-01-03T081004.630959Z [info ] Writing state to Local Filesystem
2023-01-03T081004.633253Z [debug ] {'uri': '//project/.meltano/state/devtap snowflake sales invoice to target duckdb stagingcc/lock', 'mode': 'r', 'buffering': -1, 'encoding': None, 'errors': None, 'newline': None, 'closefd': True, 'opener': None, 'compression': 'infer_from_extension', 'transport_params': None}
2023-01-03T081004.635055Z [debug ] {'uri': '//project/.meltano/state/devtap snowflake sales invoice to target duckdb stagingcc/lock', 'mode': 'w+', 'buffering': -1, 'encoding': None, 'errors': None, 'newline': None, 'closefd': True, 'opener': None, 'compression': 'infer_from_extension', 'transport_params': {}}
2023-01-03T081004.643909Z [debug ] {'uri': '//project/.meltano/state/devtap snowflake sales invoice to target duckdb stagingcc/state.json', 'mode': 'w+', 'buffering': -1, 'encoding': None, 'errors': None, 'newline': None, 'closefd': True, 'opener': None, 'compression': 'infer_from_extension', 'transport_params': {}}
2023-01-03T081004.664174Z [info ] Incremental state has been updated at 2023-01-03 081004.664044.
2023-01-03T081004.664278Z [debug ] Incremental state: {'currently_syncing': 'ANALYTICS-SALES_INVOICE_V', 'bookmarks': {'ANALYTICS-SALES_INVOICE_V': {'replication_key': 'UPDATED_TIMESTAMP', 'version': 1670361200499, 'replication_key_value': '2022-08-31T121649.583000+0000+0000'}}}
2023-01-03T081004.664319Z [info ] {"currently_syncing": "ANALYTICS-SAP-SALES_INVOICE_V", "bookmarks": {"ANALYTICS-SALES_INVOICE_V": {"replication_key": "UPDATED_TIMESTAMP", "version": 1670361200499, "replication_key_value": "2022-08-31T121649.583000+0000+0000"}}} cmd_type=elb consumer=True name=target-duckdb-staging producer=False stdio=stdout string_id=target-duckdb-staging
2023-01-03T081005.721434Z [debug ] Deleted configuration at /project/.meltano/run/tap-snowflake-sales-invoice/tap.fad84407-910b-41e6-97b8-f282af3a0c97.config.json
2023-01-03T081005.721740Z [debug ] Deleted configuration at /project/.meltano/run/map-sales-invoice/mapper.a618689d-a999-4467-a404-cb99a891b96f.config.json
2023-01-03T081005.721975Z [debug ] Deleted configuration at /project/.meltano/run/target-duckdb-staging/target.c2f5eab8-15cc-4596-a9c6-59673a1d67dd.config.json
2023-01-03T081006.007373Z [error ] Extractor failed
Traceback (most recent call last):
File "/.venv/lib/python3.9/site-packages/meltano/core/logging/output_logger.py", line 201, in redirect_logging
yield
File "/.venv/lib/python3.9/site-pack…christoph
01/03/2023, 9:23 PMmeltano.cli.utils.CliError: Run invocation could not be completed as block failed: Extractor failed
yet there does not seem to be any indication of an issue being logged by the tap-snowflake
extractor. I suppose that the HTTP 403 "Forbidden" error you mentioned is the best indicator to follow up for now. Are you in a position to compare the experience of using the pipelinewise variant vs the meltanolabs variant of tap-snowflake
?
The other thing that obviously makes this hard to troubleshoot is the 6.5 hours wait time for an error to occur. I'm not sure what would be the best step here to reduce that time, so you can iterate faster.peter_pezon
01/03/2023, 10:27 PMtap-snowflake
- didn't quite work, b/c i intend to incrementally load using replication key. The meltanolabs variant was throwing errors. I'm thinking about using it for bulk loading the initial data, and transferwise variant for incremental loading.christoph
01/03/2023, 10:52 PMpeter_pezon
01/04/2023, 3:56 PM2023-01-04T04:38:41.802248Z [info ] Writing state to Local Filesystem
2023-01-04T04:38:41.846267Z [info ] Incremental state has been updated at 2023-01-04 04:38:41.846120.
2023-01-04T04:38:50.128172Z [info ] time=2023-01-04 04:38:50 name=singer level=INFO message=METRIC: {"type": "counter", "metric": "record_count", "value": 42818, "tags": {"database": "ANALYTICS", "table": "SALES_INVOICE_V"}} cmd_type=elb consumer=False name=tap-snowflake-sap-sales-invoice producer=True stdio=stderr string_id=tap-snowflake-sap-sales-invoice
2023-01-04T04:39:18.373086Z [info ] time=2023-01-04 04:39:18 name=snowflake.connector.result_batch level=ERROR message=Failed to fetch the large result set batch data_2_1_1 for the 1 th time, backing off for 3s for the reason: '000403: HTTP 403: Forbidden' cmd_type=elb consumer=False name=tap-snowflake-sap-sales-invoice producer=True stdio=stderr string_id=tap-snowflake-sap-sales-invoice
2023-01-04T04:39:18.373346Z [info ] Traceback (most recent call last): cmd_type=elb consumer=False name=tap-snowflake-sap-sales-invoice producer=True stdio=stderr string_id=tap-snowflake-sap-sales-invoice
2023-01-04T04:39:18.373479Z [info ] File "/project/.meltano/extractors/tap-snowflake/venv/lib/python3.9/site-packages/snowflake/connector/result_batch.py", line 314, in _download cmd_type=elb consumer=False name=tap-snowflake-sap-sales-invoice producer=True stdio=stderr string_id=tap-snowflake-sap-sales-invoice
2023-01-04T04:39:18.373600Z [info ] raise RetryRequest(error) cmd_type=elb consumer=False name=tap-snowflake-sap-sales-invoice producer=True stdio=stderr string_id=tap-snowflake-sap-sales-invoice
2023-01-04T04:39:18.373715Z [info ] snowflake.connector.network.RetryRequest: 000403: HTTP 403: Forbidden cmd_type=elb consumer=False name=tap-snowflake-sap-sales-invoice producer=True stdio=stderr string_id=tap-snowflake-sap-sales-invoice
2023-01-04T04:39:21.381681Z [info ] time=2023-01-04 04:39:21 name=snowflake.connector.result_batch level=ERROR message=Failed to fetch the large result set batch data_2_1_1 for the 2 th time, backing off for 6s for the reason: '000403: HTTP 403: Forbidden' cmd_type=elb consumer=False name=tap-snowflake-sap-sales-invoice producer=True stdio=stderr string_id=tap-snowflake-sap-sales-invoice
2023-01-04T04:39:21.381962Z [info ] Traceback (most recent call last): cmd_type=elb consumer=False name=tap-snowflake-sap-sales-invoice producer=True stdio=stderr string_id=tap-snowflake-sap-sales-invoice
2023-01-04T04:39:21.382123Z [info ] File "/project/.meltano/extractors/tap-snowflake/venv/lib/python3.9/site-packages/snowflake/connector/result_batch.py", line 314, in _download cmd_type=elb consumer=False name=tap-snowflake-sap-sales-invoice producer=True stdio=stderr string_id=tap-snowflake-sap-sales-invoice
2023-01-04T04:39:21.382277Z [info ] raise RetryRequest(error) cmd_type=elb consumer=False name=tap-snowflake-sap-sales-invoice producer=True stdio=stderr string_id=tap-snowflake-sap-sales-invoice
2023-01-04T04:39:21.382421Z [info ] snowflake.connector.network.RetryRequest: 000403: HTTP 403: Forbidden cmd_type=elb consumer=False name=tap-snowflake-sap-sales-invoice producer=True stdio=stderr string_id=tap-snowflake-sap-sales-invoice
peter_pezon
01/04/2023, 4:01 PMpeter_pezon
01/04/2023, 4:01 PMpeter_pezon
01/04/2023, 4:01 PM2023-01-04T04:56:57.701999Z [info ] Writing state to Local Filesystem
2023-01-04T04:56:57.748806Z [info ] Incremental state has been updated at 2023-01-04 04:56:57.748647.
2023-01-04T04:56:57.822838Z [info ] time=2023-01-04 04:56:57 name=target_duckdb level=INFO message=Loading 5739 rows into 'analytics_sap."sales_invoice_v"' cmd_type=elb consumer=True name=target-duckdb-staging producer=False stdio=stderr string_id=target-duckdb-staging
2023-01-04T04:57:05.160649Z [info ] Writing state to Local Filesystem
2023-01-04T04:57:05.199770Z [info ] Incremental state has been updated at 2023-01-04 04:57:05.199593.
2023-01-04T04:57:06.570110Z [error ] Extractor failed
Traceback (most recent call last):
File "/.venv/lib/python3.9/site-packages/meltano/core/logging/output_logger.py", line 201, in redirect_logging
yield
File "/.venv/lib/python3.9/site-packages/meltano/core/block/extract_load.py", line 461, in run
await self.run_with_job()
File "/.venv/lib/python3.9/site-packages/meltano/core/block/extract_load.py", line 487, in run_with_job
await self.execute()
File "/.venv/lib/python3.9/site-packages/meltano/core/block/extract_load.py", line 453, in execute
await manager.run()
File "/.venv/lib/python3.9/site-packages/meltano/core/block/extract_load.py", line 651, in run
_check_exit_codes(
File "/.venv/lib/python3.9/site-packages/meltano/core/block/extract_load.py", line 800, in _check_exit_codes
raise RunnerError("Extractor failed", {PluginType.EXTRACTORS: producer_code})
meltano.core.runner.RunnerError: Extractor failed
2023-01-04T04:57:06.596007Z [error ] Block run completed. block_type=ExtractLoadBlocks err=RunnerError('Extractor failed') exit_codes={<PluginType.EXTRACTORS: 'extractors'>: 1} set_number=0 success=False
peter_pezon
01/04/2023, 4:04 PMpeter_pezon
01/04/2023, 5:29 PMCOPY INTO ...
is much more performant.christoph
01/04/2023, 9:06 PMchristoph
01/04/2023, 9:06 PMchristoph
01/04/2023, 9:09 PMchristoph
01/04/2023, 9:13 PMpeter_pezon
01/05/2023, 4:47 PMtap-snowflake
?christoph
01/05/2023, 8:57 PMpeter_pezon
01/06/2023, 5:45 AMmeltano run
fails. Wonder if retry/restart behavior could be pushed down to Meltano?christoph
01/06/2023, 6:22 AM