Package invocations :: Package cu16 :: Module cu16 :: Class NeighboursIngester
[hide private]

Class NeighboursIngester

source code


A special version of the ingester class for Neighbours tables. Designed to add extra attributes for Sloan DSS cross-match tables.


To Do: This should no longer be a subclass of Ingester. Instead these functions should become methods of the Cu16 class and call the parent Ingester class directly.

Nested Classes [hide private]

Inherited from wsatools.DbConnect.DbSession.Ingester: IngestError

    Errors & Exceptions

Inherited from wsatools.DbConnect.DbSession.DbSession: CatalogueServerError, DisconnectError

Instance Methods [hide private]
 
__init__(self, dbCon, tableSchemas, sdssTables, tag='CuID000000')
Makes connection to the requested database, and reads the schemas of the tables to be created by the supplied list of files.
source code
int
ingestTable(self, tableName, filePathName)
Loads the created neighbours table into the database.
source code
 
_completeSDSS(self, tableName)
Re-insert the additional two columns in the SDSS cross-match table and fill with data read from the database with the latest DR of SDSS.
source code
Schema.Table
_stdNeighbourTableSchema(self, tableName)
Defines the standard default Neighbour table schema.
source code

Inherited from wsatools.DbConnect.DbSession.DbSession: __del__, __str__, addColumn, addIndex, alterColumn, checkConstraints, checkSchema, commitTransaction, copyIntoTable, copyTable, createObjects, createStatistics, createTable, createUser, delete, deleteRows, dropColumn, dropObjects, dropTable, enableDirtyRead, existsTable, freeProcCache, getBestVolume, goOffline, grantAccess, insertData, query, queryAllowsNulls, queryAttrMax, queryColumnNames, queryDataTypes, queryEntriesExist, queryNumRows, queryRowSize, renameTable, rollbackTransaction, runOnServer, sharePath, shrinkTempDb, tablePath, testSharePath, truncate, uncPath, update, updateEntries, updateStatistics

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  sdssTables = None
hash(x)

Inherited from wsatools.DbConnect.DbSession.Ingester: fileOnShare, fileTag

Inherited from wsatools.DbConnect.DbSession.DbSession: database, isLoadDb, isRealRun, isTrialRun, server, sysc, userName

Instance Variables [hide private]
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, dbCon, tableSchemas, sdssTables, tag='CuID000000')
(Constructor)

source code 

Makes connection to the requested database, and reads the schemas of the tables to be created by the supplied list of files.

Parameters:
  • dbCon (DbSession) - A database connection.
  • tableSchemas (list(Schema.Table)) - Schema for tables to be ingested this session, as provided by schema.parseTables().
  • sdssTables - A list of neighbour table names that have the additional SDSS attributes.
  • sdssTables - list(str)
  • tag (str) - A tag string to append to the file name on the share directory, so file clean up can be rm *tag*.
Overrides: object.__init__

ingestTable(self, tableName, filePathName)

source code 

Loads the created neighbours table into the database.

Parameters:
  • tableName (str) - Name of table to create/update in the database.
  • filePathName (str) - Full path to the neighbour table flat file on the curation server.
Returns: int
Number of rows ingested.
Overrides: wsatools.DbConnect.DbSession.Ingester.ingestTable

_completeSDSS(self, tableName)

source code 

Re-insert the additional two columns in the SDSS cross-match table and fill with data read from the database with the latest DR of SDSS.

Parameters:
  • tableName (str) - Name of the SDSS cross-match table in the database.

To Do: Alternative method would be to outgest these attributes along with source positions, passing them through the C++ code, to enable direct ingest. But that requires extensive C++ redevelopment for just the SDSS xmatch.

_stdNeighbourTableSchema(self, tableName)

source code 

Defines the standard default Neighbour table schema.

Parameters:
  • tableName (str) - Name of the Neighbour table that will be given the default schema.
Returns: Schema.Table
A list of the default neighbour table schema attributes.