![]() Great stuff! I think this is the kind of library we want to work in a day-to-day basis. Well well, that's much better isn't it? the numbers aren't modified, they are of the correct type (int64), and it correctly guessed types date, datetime and logical/boolean! If integer64 is problematic in your case, you can also choose to convert bigint fields into other types, by using the bigint parameter when creating the connection. sicatest2 = dbGetQuery(pconn_r, 'select * from sicatest') This happens because the numeric integer is automatically converted to a floating point numeric, which loses precision with big numbers.Īlso unfortunately, it has returned dates and booleans as strings, which is incorrect, but we can work around that. Well, that didn't go as expected, right? If you look closely, the table has the number 9223372036854775807, but the query has returned 9223372036854775808 □. SuppressPackageStartupMessages(library(RJDBC)) This is the "official" way to use Amazon Redshift with R, using the JDBC driver on SQL Workbench/J is the official way to connect to it according to the documentation, and this driver can be loaded like this: # Save the driver into a directoryĭownload.file('','~/.redshiftTools/redshift-driver.jar') ![]() For all of the connections, we'll define these variables for connecting: dbname="dbname" Unfortunately, the status of the drivers compatibility is a little more shaky, but there is a way to make it work very nicely with R!įirst of all, let's go through the 3 options we have for connecting to Amazon Redshift. Amazon Redshift is one of the hottest databases for Data Warehousing right now, it's one of the most cost-effective solutions available, and allows for integration with many popular BI tools. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |