agrc / forklift

:tractor::package::sparkles: Slinging data all over the place :tractor::package::sparkles:
MIT License
27 stars 3 forks source link

fix: add missing source field type #360

Closed stdavis closed 8 months ago

stdavis commented 8 months ago

Description of Changes

This is to handle a new field type that showed up after DEQ made a schema change. Here's the error message that I hope to solve with it:

DEBUG   01-09 01:46:45       core:   81 c:\forklift\data\hashed\deqquerylayers_temp.gdb\TRI does not exist. creating
WARNING 01-09 01:46:47       core:  284 creating new table: c:\forklift\data\hashed\deqquerylayers_temp.gdb\TRI
ERROR   01-09 01:46:52       core:  164 unhandled exception: 'BigInteger' for crate source: [c:\forklift\warehouse\deq-enviro\scripts\nightly\settings\..\databases\cercla.sde\cercla.Arcserver.PTN_TRI] source_workspace: [c:\forklift\warehouse\deq-enviro\scripts\nightly\settings\..\databases\cercla.sde] destination: [c:\forklift\data\hashed\deqquerylayers_temp.gdb\TRI]
Traceback (most recent call last):
  File "C:\Users\agrc-arcgis\AppData\Local\ESRI\conda\envs\forklift\lib\site-packages\forklift\core.py", line 82, in update
    _create_destination_data(crate, skip_hash_field=change_detection.has_table(crate.source_name))
  File "C:\Users\agrc-arcgis\AppData\Local\ESRI\conda\envs\forklift\lib\site-packages\forklift\core.py", line 286, in _create_destination_data
    _mirror_fields(crate.source, crate.destination)
  File "C:\Users\agrc-arcgis\AppData\Local\ESRI\conda\envs\forklift\lib\site-packages\forklift\core.py", line 476, in _mirror_fields
    add_fields.append([field.name, TYPES[field.type], field.aliasName, field.length])
KeyError: 'BigInteger'
DEBUG   01-09 01:46:52       lift:  106 finished crate 7625 ms
INFO    01-09 01:46:52       lift:  107 result: ('Unhandled exception during update.', "'BigInteger'")
stdavis commented 8 months ago

I don't know that we need to support them since we haven't run into any of them yet, but I can add them. It's probably a good idea.