z3z1ma / target-bigquery

target-bigquery is a Singer target for BigQuery. It supports storage write, GCS, streaming, and batch load methods. Built with the Meltano SDK.
MIT License
28 stars 38 forks source link

added fix for transform_column_name and changed code to pass test #98

Closed loveeklund-osttra closed 1 month ago

loveeklund-osttra commented 2 months ago

transform_column_name gets called with unpacked arguments. This means that you can get errors like this TypeError: transform_column_name() got an unexpected keyword argument 'replace_period_with_underscore' if you run a version of the target that doesn't have that column_name_transforms.

I assume the reason is that meltano does some weird logic where it pulls the config options from the latest version of the target but allows for previous version of the code.

This PR should fix it and also solve the problems with the tests that fails ( It worked when I ran the tests locally)

arozamena commented 1 month ago

Hi im new here im getting with the plugin the error , I was trying with pip_url: z3-target-bigquery==0.7.2 and olders and with meltano pip install meltano==3.5.0

code=1 message=TypeError: transform_column_name() got an unexpected keyword argument 'replace_period_with_underscore' name=meltano run_id=32d=2024-10-15T171557--tap-csv--target-bigquery

Any idea how resolved ?

loveeklund-osttra commented 1 month ago

@arozamena Try running it with a fixed hash ( this one should work 9d1d0b08606a716a5a36f53b3388cbd6055535a8) in the meltano.yaml file and make sure you reinstall the package after updating the reference.