esppy.connectors.DatabasePublisher

class esppy.connectors.DatabasePublisher(connectstring=None, name=None, is_active=None, blocksize=None, configfilesection=None, greenplumlogminer=None, logminerdbname=None, logminerschemaowner=None, logminerstartdatetime=None, logminertablename=None, maxcolbinding=None, maxevents=None, oraclelogminer=None, publishwithupsert=None, pwdencrypted=None, selectstatement=None, transactional=None)

Bases: esppy.connectors.base.Connector

Subscribe events to a database

Parameters
connectstringstring

Specifies the database DSN and user credentials in the format ‘DSN=dsn;uid=userid;pwd=password;’

blocksizeint, optional

Specifies the number of events to include in a published event block. The default value is 1.

configfilesectionstring, optional

Specifies the name of the section in the config file to parse for configuration parameters. Specify the value as [configfilesection].

greenplumlogminerboolean, optional

Enables Greenplum log miner mode

logminerdbnamestring, optional

Specifies the gpperfmon database that contains the queries_history table for Greenplum log miner mode. Use the following format: ‘dd-mmm-yyy hh:mm:ss’.

logminerschemaownerstring, optional

Specifies the schema owner when using Oracle or Greenplum log miner mode.

logminerstartdatetimestring, optional

Specifies the start date time when using Oracle or Greenplum log miner mode.

logminertablenamestring, optional

Specifies the table name when using Oracle or Greenplum log miner mode.

maxcolbindingint, optional

Specifies the maximum supported width of string columns. The default value is 4096.

maxeventsint, optional

Specifies the maximum number of events to publish.

oraclelogminerboolean, optional

Enables Oracle log miner mode

publishwithupsertboolean, optional

Builds events with opcode=Upsert instead of Insert

pwdencryptedboolean, optional

Specifies that the pwd field in connectstring is encrypted

selectstatementstring, optional

Specifies the SQL statement to be executed on the source database. Required when oraclelogminer and greenplumlogminer are not enabled.

transactionalstring, optional

Sets the event block type to transactional. The default value is normal.

Returns
DatabasePublisher
__init__(self, connectstring=None, name=None, is_active=None, blocksize=None, configfilesection=None, greenplumlogminer=None, logminerdbname=None, logminerschemaowner=None, logminerstartdatetime=None, logminertablename=None, maxcolbinding=None, maxevents=None, oraclelogminer=None, publishwithupsert=None, pwdencrypted=None, selectstatement=None, transactional=None)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self[, connectstring, name, …])

Initialize self.

clear(self)

copy(self[, deep])

Return a copy of the object

from_element(data[, session])

Construct connector from XML definition

from_parameters(conncls[, type, name, …])

from_xml(data[, session])

Construct connector from XML definition

get(self, key[, default])

items(self)

keys(self)

pop(self, key[, default])

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem(self)

as a 2-tuple; but raise KeyError if D is empty.

set_properties(self, \*\*kwargs)

Set connector properties

setdefault(self, key[, default])

to_element(self)

Export connector definition to ElementTree.Element

to_xml(self[, pretty])

Export connector definition to XML

update(\*args, \*\*kwds)

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values(self)

Attributes

connector_key

property_defs