mike_planting
06/10/2021, 4:37 PMi am trying to run tap-mysql to pipelinewise-target-s3-scv, log based replication, locally on my mac using docker, and it get the following error: Extraction failed (1): AttributeError: 'NoneType' object has no attribute 'settimeout'. I tried adding in SQL Session variables to my meltano.yml, but that did not resolve the error. Below is a copy of the tap-mysql config. Any ideas on how to resolve this? Thanks!
- name: tap-mysql
variant: transferwise
pip_url: pipelinewise-tap-mysql
config:
host: hostname
user: hostuser
export_batch_rows: 100000
session_sqls:
- SET @@session.wait_timeout=28800
- SET @@session.net_read_timeout=3600
- SET @@session.innodb_lock_wait_timeout=3600
- SET @@session.time_zone='+0:00'
select:
- table name.*
metadata:
'*':
replication-method: LOG_BASEDdouwe_maan
06/10/2021, 4:40 PMsession_sqls isn't resolving the issue yet. Do you get the error pretty much immediately, or only after some number of rows have been synced?douwe_maan
06/10/2021, 4:41 PMdouwe_maan
06/10/2021, 4:41 PMdouwe_maan
06/10/2021, 4:42 PMmike_planting
06/10/2021, 4:47 PMmike_planting
06/10/2021, 5:01 PMdouwe_maan
06/10/2021, 5:32 PMmike_planting
06/10/2021, 5:33 PMdouwe_maan
06/10/2021, 5:35 PMmike_planting
06/10/2021, 7:39 PMdouwe_maan
06/10/2021, 7:40 PMmike_planting
06/10/2021, 7:43 PMmike_planting
06/10/2021, 7:44 PMdouwe_maan
06/10/2021, 7:47 PMmike_planting
06/10/2021, 7:48 PMdouwe_maan
06/10/2021, 7:49 PMdouwe_maan
06/10/2021, 7:50 PMdouwe_maan
06/10/2021, 7:51 PMdouwe_maan
06/10/2021, 7:51 PMmike_planting
06/10/2021, 8:32 PMmike_planting
06/10/2021, 8:33 PMtap-mysql | File "/project/.meltano/extractors/tap-mysql/venv/lib/python3.6/site-packages/pymysql/connections.py", line 1018, in _read_bytes
tap-mysql | AttributeError: 'NoneType' object has no attribute 'settimeout'
pipelinewise-target-s3-csv | time=2021-06-10 20:27:40 name=target_s3_csv level=INFO message=Uploading /tmp/clickfunnels-action_funnel_steps-20210610T202338.csv to bucket cf-bi-dashboard at di-meltano/clickfunnels-action_funnel_steps/di-meltano-clickfunnels-action_funnel_steps-20210610T202338.csv
meltano | Extraction failed (1): AttributeError: 'NoneType' object has no attribute 'settimeout'
meltano | ELT could not be completed: Extractor failed
meltano | /usr/local/lib/python3.6/site-packages/meltano/core/job/finder.py:65: SAWarning: TypeDecorator IntFlag() will not produce a cache key because the ``cache_ok`` flag is not set to True. Set this flag to True if this type object's state is safe to use in a cache key, or False to disable this warning.
meltano | .order_by(Job.ended_at.desc())
meltano | /usr/local/lib/python3.6/site-packages/meltano/core/plugin/singer/tap.py:198: SAWarning: TypeDecorator IntFlag() will not produce a cache key because the ``cache_ok`` flag is not set to True. Set this flag to True if this type object's state is safe to use in a cache key, or False to disable this warning.mike_planting
06/10/2021, 8:34 PMdouwe_maan
06/10/2021, 9:11 PMmike_planting
06/10/2021, 9:26 PMdouwe_maan
06/10/2021, 9:34 PMconnor_lough
07/14/2022, 1:24 AMmeltano run says that the table (table) declares no replication type. Wondering if the 'schema-' not showing is why this happens?
2. similarly, trying to archive created S3 files produces the error AttributeError: 'NoneType' object has no attribute 'encode'connor_lough
07/14/2022, 1:26 AMversion: 1
default_environment: dev
project_id: #
plugins:
extractors:
- name: tap-mssql
variant: wintersrd
pip_url: tap-mssql
loaders:
- name: target-snowflake
variant: transferwise
pip_url: pipelinewise-target-snowflake
environments:
- name: dev
config:
plugins:
extractors:
- name: tap-mssql
config:
host: ###
database: ###
user: ###
port: ###
default_replication_method: FULL_TABLE
select:
- schema-table.*
metadata:
schema-table:
replication-method: FULL_TABLE
loaders:
- name: target-snowflake
config:
account: ###
dbname: ###
user: ###
add_metadata_columns: true
warehouse: ###
file_format: PARQUET
default_target_schema: ###
role: ###
stage: ###
s3_bucket: ###
s3_key_prefix: ###
s3_region_name: ###
archive_load_files: true
archive_load_files_s3_prefix: ###
archive_load_files_s3_bucket: ###
- name: staging
- name: proddouwe_maan
07/14/2022, 12:42 PMmetadata and select just below pip_url: tap-mssql ? Part of this may be explained by https://github.com/meltano/meltano/issues/3322, which was fixed in https://github.com/meltano/meltano/pull/6376 but not released yetconnor_lough
07/14/2022, 3:28 PM/None/DBSyncHistory/meltano_fin_data_martpipelinewise_dbo-DBSyncHistory_20220714-152201-043485_batch_1qin3sdl.parquet.gzdouwe_maan
07/14/2022, 3:32 PMconnor_lough
07/14/2022, 3:34 PMdouwe_maan
07/14/2022, 3:36 PMAttributeError: 'NoneType' object has no attribute 'encode' error if there are any. The stack trace is the list of all the nested methods calls that led to that error, so that helps us find where it went wrong in the code. If you donāt see those, run again with metlano --log-level=debug ... and they should show upconnor_lough
07/14/2022, 3:38 PMdouwe_maan
07/14/2022, 3:47 PMarchive_load_files_s3_prefix: ###
archive_load_files_s3_bucket: ###douwe_maan
07/14/2022, 3:49 PMdouwe_maan
07/14/2022, 3:49 PMI want to be able to archive data into s3 when data is comming from taps that only send <<table_name>> on stream list instead of <<schema_name>>_<<table_name>>So this may be an incompatibility with the tap youāre using
douwe_maan
07/14/2022, 3:50 PMdouwe_maan
07/14/2022, 3:52 PMdbo-DBSyncHistory , so it should already be finedouwe_maan
07/14/2022, 3:53 PMs3_archive_metadata contains just ahead of this line: https://github.com/transferwise/pipelinewise-target-snowflake/blob/master/target_snowflake/db_sync.py#L428connor_lough
07/14/2022, 3:56 PMconnor_lough
07/14/2022, 6:46 PMdouwe_maan
07/14/2022, 6:48 PMconnor_lough
07/14/2022, 6:50 PMdouwe_maan
07/14/2022, 6:51 PMconnor_lough
07/14/2022, 7:07 PMconnor_lough
07/14/2022, 7:08 PMShowing variable: s3_archive_key as None/DBSyncHistory/meltano_fin_data_martpipelinewise_dbo-DBSyncHistory_20220714-190359-644623_batch_9v5trzgm.parquet.gz
going to keep chasing it upstream...douwe_maan
07/14/2022, 7:08 PMconnor_lough
07/14/2022, 7:09 PMShowing variable: s3_archive_metadata as {'tap': None, 'schema': 'dbo', 'table': 'DBSyncHistory', 'archived-by': 'pipelinewise_target_snowflake'}douwe_maan
07/14/2022, 7:10 PMconnor_lough
07/14/2022, 8:19 PMconnor_lough
07/14/2022, 8:19 PMdouwe_maan
07/14/2022, 8:29 PMtap comes from: https://github.com/transferwise/pipelinewise-target-snowflake/blob/master/target_snowflake/__init__.py#L486connor_lough
07/19/2022, 12:04 AMdouwe_maan
07/20/2022, 2:22 PMmeltano invoke --dump=config tap-foo