Striim 3.9.7 documentation

MySQLReader and MariaDBReader properties

These two readers are identical except for the Cluster Support, Start Position, and Start Timestamp properties.

Before using MySQLReader, the tasks described in MySQL / MariaDB setup and in Installing the MySQL JDBC driver must be completed.

Before using MariaDBReader, the tasks described in MySQL / MariaDB setup and Installing the MariaDB JDBC driver must be completed.

Striim provides templates for creating applications that read from MySQL and write to various targets. See Creating a new application using a template for details.

The adapter properties are:

property

type

default value

notes

Bidirectional Marker Table

java. lang.String

When performing bidirectional replication, the fully qualified name of the marker table (see Bidirectional replication). This setting is case-sensitive.

Cluster Support

java. lang. String

MariaDBReader only: set to Galera when reading from a MariaDB Galera Cluster.

Compression

java. lang. Boolean

False

Set to True when the output of a MySQLReader source is the input of a Notes on writing to Cassandra with DatabaseWriter target.

When replicating data from one MySQL instance to another, when a table contains a column of type FLOAT, updates and deletes may fail with messages in the log including "Could not find appropriate handler for SqlType." Setting Compression to True may resolve this issue. If the table's primary key is of type FLOAT, to resolve the issue you may need to change the primary key column type in MySQL.

Connection Retry Policy

java. lang. String

retryInterval=30, maxRetries=3

The connection retry policy includes retryInterval and maxRetries. With the default setting, if a connection attempt is unsuccessful, the adapter will try again in 30 seconds (retryInterval. If the second attempt is unsuccessful, in 30 seconds it will try a third time (maxRetries). If that is unsuccessful, the adapter will fail and log an exception. Negative values are not supported.

Connection URL

java. lang. String

When reading from MySQL, mysql:// followed by the MySQL server's IP address or network name, optionally a colon and the port number (if not specified, port 3306 is used), and optionally a slash followed by the database name.

When reading from MariaDB, jdbc:mariadb:// followed by the MariaDB server's IP address or network name, optionally a colon and the port number (if not specified, port 3306 is used), and optionally a slash followed by the database name.

When reading from a MariaDB Galera Cluster, specify the IP address and port for each server in the cluster, separated by commas: jdbc:mariadb://<IP address>:<port>,<IP address>:<port>,..., and optionally a slash followed by the database name.

Database

java. lang. String

the name of the database containing the tables (may be omitted if specified in Tables or ConnectionURL)

Excluded Tables

java. lang. String

Change data for any tables specified here will not be returned. For example, if Tables uses a wildcard, data from any tables specified here will be omitted. Multiple table names and wildcards may be used as for Tables.

Filter Transaction Boundaries

java. lang. Boolean

True

With the default value of True, begin and commit transactions are filtered out. Set to False to include begin and commit transactions.

Password

com. webaction. security. Password

the password specified for the username (see Encrypted passwords)

Send Before Image

java. lang. Boolean

True

set to False to omit before data from output

Start Position

java. lang. String

MariaDBReader only: With the default value of null, reading starts with transactions that are committed after the Striim application is started.

To start from an earlier point, specify a Global Transaction ID (GTID) in the format GTID: #-#-#, replacing #-#-# with the last GTID before the point where you want to start. Reading will start with the next valid GTID.

When the application is recovered after a system failure, it will automatically resume from the point where it left off.

Start Timestamp

java. lang. String

null

MySQLReader only: With the default value of null, only new (based on current system time) transactions are read. If a timestamp is specified, transactions that began after that time are also read. The format is DD-MON-YYYY HH:MI:SS. For example, to start at 5:00 pm on July 15, 2017, specify 15-JUL-2017 17:00:00.

When the application is recovered after a system failure, it will automatically resume from the point where it left off.

Tables

java. lang. String

The table(s) for which to return change data. Names are case-sensitive. If a value is not specified for Database you must use fully qualified table names. You may specify multiple tables as a list separated by semicolons or with the following wildcards in the table name only (not in the database name):

  • %: any series of characters

  • _: any single character

For example, my.% would include all tables in the my database.

If any specified tables are missing Striim will issue a warning. If none of the specified tables exists, start will fail with a "found no tables" error.

Username

java. lang. String

the login name for the user created as described in MySQL / MariaDB setup