Striim 3.10.3 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

String

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

Cluster Support

String

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

Compression

Boolean

False

Set to True when the output of a MySQLReader source is the input of a Cassandra Writer 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

String

retryInterval=30, maxRetries=3

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

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.

Appending ?zeroDateTimeBehavior=convertToNull to the connection URL will convert "zero" DATE and DATETIME values) to nulls (see MySQLReader data type support and correspondence).

Database

String

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

Excluded Tables

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

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

encrypted password

the password specified for the username (see Encrypted passwords)

Send Before Image

Boolean

True

set to False to omit before data from output

Start Position

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.

See also Switching from initial load to continuous replication.

Start Timestamp

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 YYYY-MMM-DD HH:MM:SS. For example, to start at 5:00 pm on February 1, 2020, specify 2020-FEB-01 17:00:00.

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

See also Switching from initial load to continuous replication.

Tables

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

String

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