harshit_soni
12/06/2022, 7:47 AM--variant buzzcutnorman
2022-12-06T074031.155867Z [error ] Loader failed
"""╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /Users/harshit.soni/opt/anaconda3/envs/py39/lib/python3.9/site-packages/meltano/core/logging/out │
│ put_logger.py:201 in redirect_logging │
│ │
│ 198 │ │ │ *ignore_errors, │
│ 199 │ │ ) │
│ 200 │ │ try: │
│ ❱ 201 │ │ │ yield │
│ 202 │ │ except ignored_errors: # noqa: WPS329 │
│ 203 │ │ │ raise │
│ 204 │ │ except Exception as err: │
│ │
│ ╭────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ err = RunnerError('Loader failed') │ │
│ │ ignore_errors = () │ │
│ │ ignored_errors = (<class 'KeyboardInterrupt'>, <class 'asyncio.exceptions.CancelledError'>) │ │
│ │ logger = <RootLogger root (DEBUG)> │ │
│ │ self = <meltano.core.logging.output_logger.Out object at 0x7ff2201999a0> │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/harshit.soni/opt/anaconda3/envs/py39/lib/python3.9/site-packages/meltano/core/block/extra │
│ ct_load.py:461 in run │
│ │
`│ 458 │ │ │ # TODO: legacy meltano elt
style logging should be deprecated │`
│ 459 │ │ │ legacy_log_handler = self.output_logger.out("meltano", logger) │
│ 460 │ │ │ with legacy_log_handler.redirect_logging(): │
│ ❱ 461 │ │ │ │ await self.run_with_job() │
`│ 462 │ │ │ │ return …christoph
12/06/2022, 8:05 AMharshit_soni
12/06/2022, 8:12 AM022-12-06T07:40:31.042315Z [info ] jsonschema.exceptions.ValidationError: 5000.0 is not of type 'string', 'null' cmd_type=elb consumer=True name=target-s3-parquet producer=False stdio=stderr string_id=target-s3-parquet
2022-12-06T07:40:31.042432Z [info ] cmd_type=elb consumer=True name=target-s3-parquet producer=False stdio=stderr string_id=target-s3-parquet
2022-12-06T07:40:31.042547Z [info ] Failed validating 'type' in schema['properties']['Relamt']: cmd_type=elb consumer=True name=target-s3-parquet producer=False stdio=stderr string_id=target-s3-parquet
2022-12-06T07:40:31.042658Z [info ] {'type': ['string', 'null']} cmd_type=elb consumer=True name=target-s3-parquet producer=False stdio=stderr string_id=target-s3-parquet
2022-12-06T07:40:31.042775Z [info ] cmd_type=elb consumer=True name=target-s3-parquet producer=False stdio=stderr string_id=target-s3-parquet
2022-12-06T07:40:31.042885Z [info ] On instance['Relamt']: cmd_type=elb consumer=True name=target-s3-parquet producer=False stdio=stderr string_id=target-s3-parquet
2022-12-06T07:40:31.042994Z [info ] 5000.0 cmd_type=elb consumer=True name=target-s3-parquet producer=False stdio=stderr string_id=target-s3-parquet
2022-12-06T07:40:31.043123Z [info ] {"type": "RECORD", "stream": "dbo-Ledger1", "record": {"Bnkname": "dsfg", "Brnname": "", "dfg": "C", "Ddno": "", "Dddt": "2016-12-23T14:00:15.273000+00:00", "Reldt": "2016-12-23T00:00:00+00:00", "Relamt": 5000.0, "Refno": " ", "Receiptno": 0, "Vtyp": 9, "Vno": "2345", "Lno": 2, "Drcr": "C", "Booktype": "01", "Micrno": 0, "Slipno": 0, "Slipdate": "1900-01-01T00:00:00+00:00", "Chequeinname": "Test Check", "Chqprinted": 0, "Clear_mode": " ", "L1_SNo": 108}, "time_extracted": "2022-12-06T07:40:31.002550+00:00"} cmd_type=elb consumer=False name=tap-mssql producer=True stdio=stdout string_id=tap-mssql
christoph
12/06/2022, 8:23 AMjsonschema.exceptions.ValidationError: 5000.0 is not of type 'string', 'null'
There's the issuechristoph
12/06/2022, 8:24 AMtap-mssql
is saying that the "Relamt" column is expected to be of type 'string' ... but what is actually being emitted is a float instead.harshit_soni
12/06/2022, 8:26 AMchristoph
12/06/2022, 8:31 AMtap-mssql
Under the hood, the Meltano SDK uses SQLAlchemy Core to do all the hard work of abstracting away the different SQL database implementations.christoph
12/06/2022, 8:32 AMtap-mssql
christoph
12/06/2022, 8:34 AMtap-mssql
myself. In production, I still rely on the the default variant https://hub.meltano.com/extractors/tap-mssql--wintersrd/
As a quick workaround, you could give that variant a try if you need to put something together quickly and if you don't need any of the features of the Meltano SDK.harshit_soni
12/06/2022, 8:36 AMchristoph
12/06/2022, 8:37 AMchristoph
12/06/2022, 8:38 AMchristoph
12/06/2022, 8:47 AMselect column_name,data_type from information_schema.columns where table_name = 'Ledger1' and column_name = 'Relamt';
to see if it the data_type is indeed numeric or decimalharshit_soni
12/06/2022, 8:49 AMchristoph
12/06/2022, 8:55 AMtap-mssql
is getting stuck.christoph
12/06/2022, 8:59 AMtap-mssql
to_jsonschema_type()
override method and be mapped to the correct JSON type (i.e. a numeric JSON type, since "MONEY" and "SMALLMONEY" are just decimal in SQL Server) https://github.com/BuzzCutNorman/tap-mssql/blob/9bdceb5bcc0d22c921c17e9207975c003fc66e40/tap_mssql/client.py#L91-L95christoph
12/06/2022, 9:00 AMBuzzCutNorman
12/06/2022, 3:50 PMBuzzCutNorman
12/06/2022, 10:14 PMmeltano install --clean
in existing projects to get the fix. https://github.com/BuzzCutNorman/tap-mssql/issues/8#issuecomment-1340060294harshit_soni
12/07/2022, 1:37 PM