moj-analytical-services / pydbtools

Python version of dbtools
https://moj-analytical-services.github.io/pydbtools/
10 stars 2 forks source link

Allow decimals #34

Closed MrAlecJohnson closed 3 years ago

MrAlecJohnson commented 3 years ago

This adds decimal to the dictionary of data types, and reads them into Pandas as floats. These are the decimals that can arrive from databases like Oracle via AWS Database Migration Service.

Decimals have already been added to etl_manager, so this is needed to let pydbtools read all the data types in our Glue databases.

Unit test for decimals added, and existing failing unit test updated (boolean wasn't working). I've added a decimal column to the test data on S3 and the test schema in Glue.

(This may also fix #3, though I'm not familiar with Presto and am not sure if those decimals work in exactly the same way.)