org.jhuapl.edu.sages.etl.strategy
Class ETLPostgresqlStrategy

java.lang.Object
  extended by org.jhuapl.edu.sages.etl.strategy.ETLStrategyTemplate
      extended by org.jhuapl.edu.sages.etl.strategy.ETLPostgresqlStrategy

public class ETLPostgresqlStrategy
extends ETLStrategyTemplate

ETLPostgresqlStrategy is the Postgresql specific strategy for the ETL processing logic. Transaction handling, SQL syntax nuances, and error codes are for Postgresql.

Author:
POKUAM1

Field Summary
static Set<String> postgresqlIgnorableErrorCodes
           
 
Fields inherited from class org.jhuapl.edu.sages.etl.strategy.ETLStrategyTemplate
ignorableErrorCodes, m_socj, m_sqlStateHandler
 
Constructor Summary
ETLPostgresqlStrategy()
           
ETLPostgresqlStrategy(SagesOpenCsvJar socj)
           
 
Method Summary
 String buildInsertIntoCleansingTableSql(Connection c, SagesOpenCsvJar socj)
          building SQL for inserting into cleansing table
 Savepoint buildStagingTable(Connection c, SagesOpenCsvJar socj, Savepoint save1)
          create staging table
 void copyFromCleanseToStaging(Connection c, SagesOpenCsvJar socj, Savepoint save2)
          building & executing SQL for copying from cleansing to staging table
 void setAndExecuteInsertIntoCleansingTablePreparedStatement(Connection c, SagesOpenCsvJar socj, ArrayList<String[]> entries_rawdata, Savepoint save2, PreparedStatement ps_INSERT_CLEANSE)
          set & execute SQL for inserting into cleansing table
 
Methods inherited from class org.jhuapl.edu.sages.etl.strategy.ETLStrategyTemplate
addFlagColumn, alterCleanseTableAddFlagColumn, alterStagingTableAddFlagColumn, buildCleanseTable, buildEtlStatusTable, determineHeaderColumns, errorCleanup, extractHeaderColumns, generateSourceDestMappings, truncateCleanseAndStagingTables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

postgresqlIgnorableErrorCodes

public static final Set<String> postgresqlIgnorableErrorCodes
Constructor Detail

ETLPostgresqlStrategy

public ETLPostgresqlStrategy(SagesOpenCsvJar socj)

ETLPostgresqlStrategy

public ETLPostgresqlStrategy()
Method Detail

buildStagingTable

public Savepoint buildStagingTable(Connection c,
                                   SagesOpenCsvJar socj,
                                   Savepoint save1)
                            throws SQLException,
                                   SagesEtlException
Description copied from class: ETLStrategyTemplate
create staging table

Throws:
SQLException
SagesEtlException

buildInsertIntoCleansingTableSql

public String buildInsertIntoCleansingTableSql(Connection c,
                                               SagesOpenCsvJar socj)
                                        throws SQLException
Description copied from class: ETLStrategyTemplate
building SQL for inserting into cleansing table

Throws:
SQLException

setAndExecuteInsertIntoCleansingTablePreparedStatement

public void setAndExecuteInsertIntoCleansingTablePreparedStatement(Connection c,
                                                                   SagesOpenCsvJar socj,
                                                                   ArrayList<String[]> entries_rawdata,
                                                                   Savepoint save2,
                                                                   PreparedStatement ps_INSERT_CLEANSE)
                                                            throws SQLException
Description copied from class: ETLStrategyTemplate
set & execute SQL for inserting into cleansing table

Throws:
SQLException

copyFromCleanseToStaging

public void copyFromCleanseToStaging(Connection c,
                                     SagesOpenCsvJar socj,
                                     Savepoint save2)
                              throws SQLException,
                                     SagesEtlException
Description copied from class: ETLStrategyTemplate
building & executing SQL for copying from cleansing to staging table

Throws:
SQLException
SagesEtlException


Copyright © 2013 Johns Hopkins University Applied Physics Laboratory. All rights reserved.