ImporterClass: Data imported Class

Description Methods Examples

Description

Class to import text files into netezza db using external table

Methods

Public methods


Method setDSN()

Usage
ImporterClass$setDSN(DSN_NAME)
Arguments
DSN_NAME
Returns
Examples

Method setExternalTableParams()

Usage
ImporterClass$setExternalTableParams(params, append = FALSE)
Arguments
params

list of parameters

append

wheather append parameter to existing list or replace it

Returns
Examples

Method setTableDetails()

Usage
ImporterClass$setTableDetails(
  tableName,
  finaltablecolumns,
  inputfilecolumns,
  insertcolumns,
  createTable = FALSE
)
Arguments
tableName

name of final table

finaltablecolumns

column list of final table. this is used to make a new table it must be a list sasme as the following list finaltablecolumns=list(name=c('dggid','value'),type=c('bigint','float'))

inputfilecolumns

column list of text files, it must be as following list inputfilecolumns=list(name=c('id','value','dggid'),type=c('varchar(100)','varchar(100)','varchar(100)'))

insertcolumns

The type convertion of tables when copying from external table to distanation table. use the following example insertcolumns='CAST(dggid AS bigint),CAST(value AS float )', NOTE: the order of columns are same as @param finaltablecolumns list and column names are as @param inputfilecolumns

createTable

= FALSE If true it drops previus table if exists and makes a new table

Returns
Examples

Method importDirectory()

Usage
ImporterClass$importDirectory(path, extention = "*.csv")
Arguments
path

folder name

extention

= "*.csv" file extentions in folder

Returns
Examples

Method importFile()

Usage
ImporterClass$importFile(filename)
Arguments
filename

file name

Returns

Method clone()

The objects of this class are cloneable with this method.

Usage
ImporterClass$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## ------------------------------------------------
## Method `ImporterClass$setDSN`
## ------------------------------------------------




## ------------------------------------------------
## Method `ImporterClass$setExternalTableParams`
## ------------------------------------------------



## ------------------------------------------------
## Method `ImporterClass$setTableDetails`
## ------------------------------------------------



## ------------------------------------------------
## Method `ImporterClass$importDirectory`
## ------------------------------------------------

thespatiallabatLaurier/nzdggs documentation built on Sept. 7, 2020, 4:33 p.m.