Skip to content

tagwhom/RNetezza

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Packages

No packages published

Languages

  • R 100.0%