Skip to main content

MySQL Lookup

1. Introduce

Mysql Lookup table,full and asynchronous approaches are supported. Full cache: Load all dimensional table data into memory, and it is recommended that the amount of data is not used. Asynchronous caching: Query data using asynchronous means, and cache the queried data to memory using lru, which is recommended for large amounts of data.

2. Version Support

MySQL 5.x

3. Connector Name

SQLmysql-x

4. Parameter description

  • connector
    • Description:mysql-x
    • Required:Required
    • Type: String
    • Default:(none)
  • url

    • Description:URL of MySQL connection,search MySQL Documents for detail information.
    • Required:Required
    • Type:String
    • Default:(none)
  • schema

    • Description: database schema name
    • Required: Optional
    • Type: String
    • Default: (none)
  • table-name
    • Description:The name of table
    • Required:Required
    • Type: String
    • Default:(none)
  • username
    • Description:user of login
    • Required:Optional
    • Type:String
    • Default:(none)
  • password
    • Description:password of login
    • Required:Optional
    • Type:String
    • Default:(none)
  • lookup.cache-type
    • Description:lookup table cache type(NONE、LRU、ALL)
    • Required:Optional
    • Type: String
    • Default:LRU
  • lookup.cache-period
    • Description:time of interval ALL lookup table load data, Unit: ms.
    • Required:Optional
    • Type: String
    • Default:3600000
  • lookup.cache.max-rows
    • Description:size of data in lru lookup table cache.
    • Required:Optional
    • Type: String
    • Default:10000
  • lookup.cache.ttl
    • Description:time of data that lru lookup table cache.
    • Required:Optional
    • Type: String
    • Default:60000
  • lookup.fetch-size
    • Description:size of data that ALL lookup table load in every batch.
    • Required:Optional
    • Type: String
    • Default:1000
  • lookup.parallelism
    • Description:parallelism of lookup table.
    • Required:Optional
    • Type: String
    • Default:(none)

5. Data Type

SUPPORTEDDATA TYPE
YESBOOLEAN、BIT、TINYINT、TINYINT UNSIGNED、SMALLINT、SMALLINT UNSIGNED、MEDIUMINT、MEDIUMINT UNSIGNED、 INT、INT UNSIGNED、INTEGER、INT UNSIGNED、BIGINT、BIGINT UNSIGNED、REAL、FLOAT、FLOAT UNSIGNED、DECIMAL、DECIMAL UNSIGNED、NUMERIC、DOUBLE、DOUBLE UNSIGNED、STRING、VARCHAR、CHAR、TIMESTAMP 、DATETIME、DATE、TIME、YEAR、TINYBLOB、BLOB、MEDIUMBLOB、LONGBLOB、TINYTEXT、TEXT、MEDIUMTEXT、LONGTEXT、BINARY、VARBINARY、JSON、ENUM、SET、GEOMETRY
NOARRAY、MAP、STRUCT、UNION

6. Example

The details are in flinkx-examples dir.