github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/pkg/sink/codec/simple/message.json (about) 1 [ 2 { 3 "namespace": "com.pingcap.simple.avro", 4 "name": "DataType", 5 "type": "record", 6 "docs": "each column's mysql type information", 7 "fields": [ 8 { 9 "name": "mysqlType", 10 "type": "string" 11 }, 12 { 13 "name": "charset", 14 "type": "string" 15 }, 16 { 17 "name": "collate", 18 "type": "string" 19 }, 20 { 21 "name": "length", 22 "type": "long" 23 }, 24 { 25 "name": "decimal", 26 "type": [ 27 "null", 28 "int" 29 ], 30 "default": null 31 }, 32 { 33 "name": "elements", 34 "type": [ 35 "null", 36 { 37 "type": "array", 38 "items": "string" 39 } 40 ], 41 "default": null 42 }, 43 { 44 "name": "unsigned", 45 "type": [ 46 "null", 47 "boolean" 48 ], 49 "default": null 50 }, 51 { 52 "name": "zerofill", 53 "type": [ 54 "null", 55 "boolean" 56 ], 57 "default": null 58 } 59 ] 60 }, 61 { 62 "namespace": "com.pingcap.simple.avro", 63 "name": "ColumnSchema", 64 "type": "record", 65 "docs": "each column's schema information", 66 "fields": [ 67 { 68 "name": "name", 69 "type": "string" 70 }, 71 { 72 "name": "dataType", 73 "type": "com.pingcap.simple.avro.DataType" 74 }, 75 { 76 "name": "nullable", 77 "type": "boolean" 78 }, 79 { 80 "name": "default", 81 "type": [ 82 "null", 83 "string" 84 ] 85 } 86 ] 87 }, 88 { 89 "namespace": "com.pingcap.simple.avro", 90 "name": "IndexSchema", 91 "type": "record", 92 "docs": "each index's schema information", 93 "fields": [ 94 { 95 "name": "name", 96 "type": "string" 97 }, 98 { 99 "name": "unique", 100 "type": "boolean" 101 }, 102 { 103 "name": "primary", 104 "type": "boolean" 105 }, 106 { 107 "name": "nullable", 108 "type": "boolean" 109 }, 110 { 111 "name": "columns", 112 "type": { 113 "type": "array", 114 "items": "string" 115 } 116 } 117 ] 118 }, 119 { 120 "namespace": "com.pingcap.simple.avro", 121 "name": "TableSchema", 122 "type": "record", 123 "docs": "table schema information", 124 "fields": [ 125 { 126 "name": "database", 127 "type": "string" 128 }, 129 { 130 "name": "table", 131 "type": "string" 132 }, 133 { 134 "name": "tableID", 135 "type": "long" 136 }, 137 { 138 "name": "version", 139 "type": "long" 140 }, 141 { 142 "name": "columns", 143 "type": { 144 "type": "array", 145 "items": "com.pingcap.simple.avro.ColumnSchema" 146 } 147 }, 148 { 149 "name": "indexes", 150 "type": { 151 "type": "array", 152 "items": "com.pingcap.simple.avro.IndexSchema" 153 } 154 } 155 ] 156 }, 157 { 158 "namespace": "com.pingcap.simple.avro", 159 "name": "Checksum", 160 "type": "record", 161 "docs": "event's e2e checksum information", 162 "fields": [ 163 { 164 "name": "version", 165 "type": "int" 166 }, 167 { 168 "name": "corrupted", 169 "type": "boolean" 170 }, 171 { 172 "name": "current", 173 "type": "long" 174 }, 175 { 176 "name": "previous", 177 "type": "long" 178 } 179 ] 180 }, 181 { 182 "namespace": "com.pingcap.simple.avro", 183 "name": "Watermark", 184 "type": "record", 185 "docs": "the message format of the watermark event", 186 "fields": [ 187 { 188 "name": "version", 189 "type": "int" 190 }, 191 { 192 "name": "commitTs", 193 "type": "long" 194 }, 195 { 196 "name": "buildTs", 197 "type": "long" 198 } 199 ] 200 }, 201 { 202 "namespace": "com.pingcap.simple.avro", 203 "name": "Bootstrap", 204 "type": "record", 205 "docs": "the message format of the bootstrap event", 206 "fields": [ 207 { 208 "name": "version", 209 "type": "int" 210 }, 211 { 212 "name": "buildTs", 213 "type": "long" 214 }, 215 { 216 "name": "tableSchema", 217 "type": "com.pingcap.simple.avro.TableSchema" 218 } 219 ] 220 }, 221 { 222 "namespace": "com.pingcap.simple.avro", 223 "name": "DDL", 224 "type": "record", 225 "docs": "the message format of the DDL event", 226 "fields": [ 227 { 228 "name": "version", 229 "type": "int" 230 }, 231 { 232 "name": "type", 233 "type": { 234 "type": "enum", 235 "name": "DDLType", 236 "symbols": [ 237 "CREATE", 238 "ALTER", 239 "ERASE", 240 "RENAME", 241 "TRUNCATE", 242 "CINDEX", 243 "DINDEX", 244 "QUERY" 245 ] 246 } 247 }, 248 { 249 "name": "sql", 250 "type": "string" 251 }, 252 { 253 "name": "commitTs", 254 "type": "long" 255 }, 256 { 257 "name": "buildTs", 258 "type": "long" 259 }, 260 { 261 "name": "tableSchema", 262 "type": [ 263 "null", 264 "com.pingcap.simple.avro.TableSchema" 265 ], 266 "default": null 267 }, 268 { 269 "name": "preTableSchema", 270 "type": [ 271 "null", 272 "com.pingcap.simple.avro.TableSchema" 273 ], 274 "default": null 275 } 276 ] 277 }, 278 { 279 "namespace": "com.pingcap.simple.avro", 280 "name": "Timestamp", 281 "type": "record", 282 "docs": "the timestamp value format", 283 "fields": [ 284 { 285 "name": "location", 286 "type": "string" 287 }, 288 { 289 "name": "value", 290 "type": "string" 291 } 292 ] 293 }, 294 { 295 "namespace": "com.pingcap.simple.avro", 296 "name": "UnsignedBigint", 297 "type": "record", 298 "docs": "unsigned bigint value format", 299 "fields": [ 300 { 301 "name": "value", 302 "type": "long" 303 } 304 ] 305 }, 306 { 307 "namespace": "com.pingcap.simple.avro", 308 "name": "DML", 309 "type": "record", 310 "docs": "the message format of the DML event", 311 "fields": [ 312 { 313 "name": "version", 314 "type": "int" 315 }, 316 { 317 "name": "database", 318 "type": "string" 319 }, 320 { 321 "name": "table", 322 "type": "string" 323 }, 324 { 325 "name": "tableID", 326 "type": "long" 327 }, 328 { 329 "name": "type", 330 "type": { 331 "type": "enum", 332 "name": "DMLType", 333 "symbols": [ 334 "INSERT", 335 "UPDATE", 336 "DELETE" 337 ] 338 } 339 }, 340 { 341 "name": "commitTs", 342 "type": "long" 343 }, 344 { 345 "name": "buildTs", 346 "type": "long" 347 }, 348 { 349 "name": "schemaVersion", 350 "type": "long" 351 }, 352 { 353 "name": "claimCheckLocation", 354 "type": [ 355 "null", 356 "string" 357 ], 358 "default": null 359 }, 360 { 361 "name": "handleKeyOnly", 362 "type": [ 363 "null", 364 "boolean" 365 ], 366 "default": null 367 }, 368 { 369 "name": "checksum", 370 "type": [ 371 "null", 372 "com.pingcap.simple.avro.Checksum" 373 ], 374 "default": null 375 }, 376 { 377 "name": "data", 378 "type": [ 379 "null", 380 { 381 "type": "map", 382 "values": [ 383 "null", 384 "long", 385 "float", 386 "double", 387 "string", 388 "bytes", 389 "com.pingcap.simple.avro.Timestamp", 390 "com.pingcap.simple.avro.UnsignedBigint" 391 ], 392 "default": null 393 } 394 ], 395 "default": null 396 }, 397 { 398 "name": "old", 399 "type": [ 400 "null", 401 { 402 "type": "map", 403 "values": [ 404 "null", 405 "long", 406 "float", 407 "double", 408 "string", 409 "bytes", 410 "com.pingcap.simple.avro.Timestamp", 411 "com.pingcap.simple.avro.UnsignedBigint" 412 ], 413 "default": null 414 } 415 ], 416 "default": null 417 } 418 ] 419 }, 420 { 421 "namespace": "com.pingcap.simple.avro", 422 "name": "Message", 423 "docs": "the wrapper for all kind of messages", 424 "type": "record", 425 "fields": [ 426 { 427 "name": "type", 428 "type": { 429 "type": "enum", 430 "name": "MessageType", 431 "symbols": [ 432 "WATERMARK", 433 "BOOTSTRAP", 434 "DDL", 435 "DML" 436 ] 437 } 438 }, 439 { 440 "name": "payload", 441 "type": [ 442 "com.pingcap.simple.avro.Watermark", 443 "com.pingcap.simple.avro.Bootstrap", 444 "com.pingcap.simple.avro.DDL", 445 "com.pingcap.simple.avro.DML" 446 ] 447 } 448 ] 449 } 450 ]