Skip to main content

Mock Source

Applicable EditionsTapData CloudTapData Cloud offers you cloud services that are suitable for scenarios requiring rapid deployment and low initial investment, helping you focus more on business development rather than infrastructure management. Free trial with TapData Cloud.TapData EnterpriseTapData Enterprise can be deployed in your local data center, making it suitable for scenarios with strict requirements on data sensitivity or network isolation. It can serve to build real-time data warehouses, enable real-time data exchange, data migration, and more.TapData CommunityTapData Community is an open-source data integration platform that provides basic data synchronization and transformation capabilities. This helps you quickly explore and implement data integration projects. As your project or business grows, you can seamlessly upgrade to TapData Cloud or TapData Enterprise to access more advanced features and service support.

The Mock Source can be used as a source database, primarily for performance testing scenarios.

Parameter Descriptions

  • Initial Data Volume: The total number of records for full synchronization, range: 0 ~ 9223372036854775807.
  • Incremental Interval + Incremental Interval Count: Controls the frequency of generating incremental data, indicating that Incremental Interval Count records are generated within the Incremental Interval time, range: 0 ~ 2147483647.
  • Incremental Event Types: Specifies the types of events to generate. If all three are selected, it generates Insert Events first, followed by Update Events, and finally Delete Events, in this sequence until completion.
  • Table Name + Field Definitions: Used to define the data model when acting as a source.

Model

Field Types

  • string[($byte)][fixed]: String

    • $byte: Byte length (default: 64)
    • fixed: Indicates fixed length if this marker is added (default: variable length)
  • number[($precision,$scale)]: Numeric

    • $precision: Length (range 1-40, default 4)
    • $scale: Scale (range 0-10, default 1)
  • boolean: Boolean

  • date: Date

  • array: Array

  • binary: Byte

  • map: Key-value pair

  • time: Time

  • datetime: Date + Time

  • now: Current time

  • uuid: UUID

  • serial[($begin,$step)]: Auto-increment

    • $begin: Start position (default: 1)
    • $step: Step size (default: 1)
  • rnumber[($precision)]: Random number

    • $precision: Length (default: 4)
  • rstring[($byte)]: Random string of specified length

    • $byte: Byte length (default: 64)
  • rdatetime[($fraction)]: Random date with specified precision

    • $fraction: Time precision (default: 0, range 0-9)
  • rlongstring[($byte)]: Random long string of specified length

    • $byte: Byte length (default: 1000)
  • rlongbinary[($byte)]: Random binary of specified length

    • $byte: Byte length (default: 1000)

Field Default Values

Default values used when generating data. If not set, data will be null.

Limitations

When mode='ConnHeartbeat', no other parameters need to be configured:

  • No data for full synchronization

  • Fixed data model:

    _tapdata_heartbeat_table=[
    { "type": "string(64)", "pri": true, "name": "id", "def": "$connId" },
    { "type": "now", "pri": false, "name": "ts" }
    ]
  • Fixed frequency: 1 record/1000ms

  • Only generates update events