esppy.connectors.DatabaseSubscriber

class esppy.connectors.DatabaseSubscriber(connectstring=None, desttablename=None, name=None, is_active=None, snapshot=None, configfilesection=None, commitrows=None, commitsecs=None, ignoresqlerrors=None, maxcolbinding=None, pwdencrypted=None, rmretdel=None)

Bases: esppy.connectors.base.Connector

Subscribe to database events

Parameters
connectstringstring

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

desttablenamestring

Specifies the target table name

snapshotboolean, optional

Specifies whether to send snapshot data

configfilesectionstring, optional

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

commitrowsint, optional

Specifies the minimum number of output rows to buffer

commitsecsint, optional

Specifies the maximum number of seconds to hold onto an incomplete commit buffer

ignoresqlerrorsboolean, optional

Enables the connector to continue to write Inserts, Updates, and Deletes to the database table despite an error in a previous Insert, Update, or Delete.

maxcolbindingint, optional

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

pwdencryptedboolean, optional

Specifies that the pwd field in connectstring is encrypted

rmretdelboolean, optional

Specifies to remove all delete events from event blocks received by a subscriber that were introduced by a window retention policy.

Returns
DatabaseSubscriber
__init__(self, connectstring=None, desttablename=None, name=None, is_active=None, snapshot=None, configfilesection=None, commitrows=None, commitsecs=None, ignoresqlerrors=None, maxcolbinding=None, pwdencrypted=None, rmretdel=None)

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

Methods

__init__(self[, connectstring, …])

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