gluent / goe

GOE: a simple and flexible way to copy data from an Oracle Database to Google BigQuery.
Apache License 2.0
8 stars 2 forks source link

Exception when offloading non-partitioned table with --offload-type=INCREMENTAL (GOE-2333) #33

Open nj1973 opened 10 months ago

nj1973 commented 10 months ago

Customer ran command:

$OFFLOAD_HOME/bin/offload -t 'WH.DIM_TMP' --target-name=SANDBOX.DIM_TMP -x -vv --offload-type=INCREMENTAL --reset-backend-table

The incorrect use of --offload-type=INCREMENTAL should cause Offload to switch back to FULL and issue a warning. Unfortunately there’s a bug in the code that outputs the warning, causing:

Find data to offload
Wed Jun 29 03:29:41 2022
Offload source data type: OffloadSourceDataFull
Step time: 0:00:00
Exception caught at top-level
Wed Jun 29 03:29:41 2022
Traceback (most recent call last):
  File "/opt/gluent/offload/bin/offload", line 29, in <module>
    offload(options)
  File "target/offload/bin/gluent.py", line 6584, in offload
  File "target/offload/bin/gluent.py", line 6276, in offload_table
  File "target/offload/bin/gluent.py", line 380, in step
  File "target/offload/bin/gluent.py", line 6277, in <lambda>
  File "target/offload/bin/gluent.py", line 2780, in get_offload_data_manager
  File "build/bdist.linux-x86_64/egg/gluentlib/offload/offload_source_data.py", line 103, in offload_source_data_factory
  File "build/bdist.linux-x86_64/egg/gluentlib/offload/offload_source_data.py", line 1160, in __init__
  File "build/bdist.linux-x86_64/egg/gluentlib/offload/offload_source_data.py", line 557, in __init__
  File "build/bdist.linux-x86_64/egg/gluentlib/offload/offload_source_data.py", line 589, in _set_offload_type
  File "build/bdist.linux-x86_64/egg/gluentlib/offload/offload_source_data.py", line 176, in get_offload_type_for_config
TypeError: warning() got an unexpected keyword argument 'ansi_type'