Description

StreamOperator to sink data to MySql.

Parameters

Name Description Type Required? Default Value
outputTableName output table name String
dbName db name String
ip ip String
password password String
port port String
username username String

Script Example

mysql batch source

  1. data = MySqlSourceBatchOp()\
  2. .setDbName("alink")\
  3. .setUsername("alink")\
  4. .setPassword(passwd)\
  5. .setIp("***")\
  6. .setPort("20001")\
  7. .setInputTableName("test")

mysql stream source

  1. data = MySqlSourceStreamOp()\
  2. .setDbName("alink")\
  3. .setUsername("alink")\
  4. .setPassword(passwd)\
  5. .setIp("***")\
  6. .setPort("20001")\
  7. .setInputTableName("test")

mysql batch sink

  1. data = MySqlSourceBatchOp()\
  2. .setDbName("alink")\
  3. .setUsername("alink")\
  4. .setPassword(passwd)\
  5. .setIp("***")\
  6. .setPort("20001")\
  7. .setOutputTableName("test_out")

mysql stream sink

  1. data = MySqlSourceStreamOp()\
  2. .setDbName("alink")\
  3. .setUsername("alink")\
  4. .setPassword(passwd)\
  5. .setIp("***")\
  6. .setPort("20001")\
  7. .setOutputTableName("test_out")