Closed OssiLehtinen closed 3 years ago
Hi @OssiLehtinen,
You are quiet right, this is an oversight. As I didn't realise that Athena only uses float
in DDL but real
in SQL functions like select cast
(https://docs.aws.amazon.com/athena/latest/ug/data-types.html).
When float has been create in the tables ddl what does that column data type return as: float
or real
?
I could always just add real
to the switch function to make sure noctua
covers all bases :)
@OssiLehtinen is there any other Data types that are missing? I am not a 100% sure if binary, map, array and struct can be simply added without some extra thinking it through.
Potentially cast them as strings for the file readrs and then parse them using jsonlite 🤔
When float has been create in the tables ddl what does that column data type return as:
float
orreal
?I could always just add
real
to the switch function to make surenoctua
covers all bases :)
I'm afk atm but I think it returns real. Will have to check, but probably only tomorrow.
@OssiLehtinen is there any other Data types that are missing? I am not a 100% sure if binary, map, array and struct can be simply added without some extra thinking it through.
Potentially cast them as strings for the file readrs and then parse them using jsonlite 🤔
Didn't bump into issues with other baisc types.
Arrays etc definitely don't work so I have been avoiding them. An interesting idea to read them in as strings and parse afterwards!
I will raise another ticket around the array data type, as I might not be able to get it working :P
Hi Dyfan,
it appears that noctua doesn't know how to interpret a query result with the type 'real'.
For example:
produces the error: "Error: Unknown shortcut: real"
Should AthenaToRDataType-function have mapping for 'real' included (instead of 'float')?
https://github.com/DyfanJones/noctua/blob/3b9d5d5494e425b8ff4673a2f18f0efdc1d6b484/R/DataTypes.R#L23 https://github.com/DyfanJones/noctua/blob/3b9d5d5494e425b8ff4673a2f18f0efdc1d6b484/R/DataTypes.R#L47