Thanks to visit codestin.com
Credit goes to github.com

Skip to content
 
 

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RNetezza

RNetezza is an DBI-compliant interface to the Netezza database.

Note

I have no longer access to a Netezza database. This package is unmaintained.

#Installation

Install via github:

install.packages('devtools')
devtools::install_github('philippechataignon/RNetezza')

Basic usage

library(DBI)
con <- dbConnect(RNetezza::Netezza(), dsn='NZN')

dbRemoveTable(con, 'mtcars')
dbWriteTable(con, "mtcars", mtcars)

dbListTables(con)
dbListFields(con, "mtcars")
dbReadTable(con, "mtcars")

# get dataframe
df <- dbGetQuery(con, 'SELECT * FROM "mtcars" WHERE "cyl" = 4')

# You can fetch all results:
res <- dbSendQuery(con, 'SELECT * FROM "mtcars" WHERE "cyl" = 4')
dbFetch(res)
dbClearResult(res)

# Or a chunk at a time
res <- dbSendQuery(con, 'SELECT * FROM "mtcars" WHERE "cyl" = 4')
# Error : no partial fetch
chunk <- dbFetch(res, n = 5)

# Clear the result
dbClearResult(res)

# Disconnect from the database
dbDisconnect(con)

#Credits

About

R DBI-compliant interface to Netezza

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages