Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netezza backend #3178

Closed
andreaspano opened this issue Oct 29, 2017 · 6 comments
Closed

Netezza backend #3178

andreaspano opened this issue Oct 29, 2017 · 6 comments
Labels
feature a feature request or enhancement

Comments

@andreaspano
Copy link

I would like to contribute at the translation of dplyr for ibm netezza

@edgararuiz-zz
Copy link

Hi @andreaspano , thank you for moving the conversation here. I recall that you mentioned that you already have some work done, is this in a fork I can take a look at?

@andreaspano
Copy link
Author

andreaspano commented Oct 31, 2017

Hi Edgard
At the moment I have connected Netezza to R by usung the odbc package and the simba driver from a Ubuntu desktop machine.
This is what I have done and it works smoothly.
Before moving forward, I was asking if you have a predefined set of tests that I can run on Netezza,
Otherwise, I will develop the tests by my self

require(odbc)
require(dplyr)
require(dbplyr)
con <- dbConnect(odbc::odbc(),
                   driver = "Simba",
                   database = "NYCFLIGHTS",
                   uid = "userR",
                   pwd = "xxx",
                   server = "192.168.69.xxx",
                   port = 5480)

dbListTables(con)
########################################
planes <- tbl(con, 'PLANES')
vars <- list('YEAR', 'TYPE', 'MANUFACTURER')
limit <- 10
arrange <- list('YEAR', 'TYPE', 'MANUFACTURER')
tbl <- 'PLANES'

df_dplyr <- planes %>%
  select_(.dots = vars) %>%
  arrange_(.dots = arrange) %>%
  head(limit) %>%
  collect()


qry <- paste('select', paste(vars, collapse = ', '),
      'from' , tbl,
      'order by', paste(arrange, collapse = ', '),
      'limit', limit )
df_sql <- dbGetQuery(con, qry) %>% as_tibble()

identical(df_dplyr, df_sql)
################################################
dbDisconnect(con)

@edgararuiz-zz
Copy link

Ok great, it looks like the default translation is working for you so far. Here's the package I use to test translations: https://github.com/rstudio/dbtest

Please let me know if you have questions or issues using it in your environment

@hadley hadley added database feature a feature request or enhancement labels Nov 2, 2017
@hadley hadley closed this as completed Nov 2, 2017
@hadley hadley reopened this Nov 2, 2017
@metanoid
Copy link

metanoid commented Feb 1, 2018

Using the dbtest package I get a fatal crash on R using the below:

# R 3.4.2
library(dbtest) # github version 0.1.0
library(odbc) # version 1.1.5
library(dbplyr) #version 1.2.0
con = dbConnect(odbc(), dsn = “NetezzaDSN”) # Using driver NetezzaSQL
test_connection(con) # --> fatal error

@ghost ghost deleted a comment from hadley Jun 7, 2018
@ghost
Copy link

ghost commented Jun 7, 2018

This issue was moved by hadley to tidyverse/dbplyr/issues/97.

@ghost ghost closed this as completed Jun 7, 2018
@lock
Copy link

lock bot commented Dec 5, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Dec 5, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants