github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/examples/java/src/main/resources/schema.avsc (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": "type", 193 "type": "string" 194 }, 195 { 196 "name": "commitTs", 197 "type": "long" 198 }, 199 { 200 "name": "buildTs", 201 "type": "long" 202 } 203 ] 204 }, 205 { 206 "namespace": "com.pingcap.simple.avro", 207 "name": "Bootstrap", 208 "type": "record", 209 "docs": "the message format of the bootstrap event", 210 "fields": [ 211 { 212 "name": "version", 213 "type": "int" 214 }, 215 { 216 "name": "type", 217 "type": "string" 218 }, 219 { 220 "name": "buildTs", 221 "type": "long" 222 }, 223 { 224 "name": "tableSchema", 225 "type": "com.pingcap.simple.avro.TableSchema" 226 } 227 ] 228 }, 229 { 230 "namespace": "com.pingcap.simple.avro", 231 "name": "DDL", 232 "type": "record", 233 "docs": "the message format of the DDL event", 234 "fields": [ 235 { 236 "name": "version", 237 "type": "int" 238 }, 239 { 240 "name": "type", 241 "type": { 242 "type": "enum", 243 "name": "DDLType", 244 "symbols": [ 245 "CREATE", 246 "ALTER", 247 "ERASE", 248 "RENAME", 249 "TRUNCATE", 250 "CINDEX", 251 "DINDEX", 252 "QUERY" 253 ] 254 } 255 }, 256 { 257 "name": "sql", 258 "type": "string" 259 }, 260 { 261 "name": "commitTs", 262 "type": "long" 263 }, 264 { 265 "name": "buildTs", 266 "type": "long" 267 }, 268 { 269 "name": "tableSchema", 270 "type": [ 271 "null", 272 "com.pingcap.simple.avro.TableSchema" 273 ], 274 "default": null 275 }, 276 { 277 "name": "preTableSchema", 278 "type": [ 279 "null", 280 "com.pingcap.simple.avro.TableSchema" 281 ], 282 "default": null 283 } 284 ] 285 }, 286 { 287 "namespace": "com.pingcap.simple.avro", 288 "name": "DML", 289 "type": "record", 290 "docs": "the message format of the DML event", 291 "fields": [ 292 { 293 "name": "version", 294 "type": "int" 295 }, 296 { 297 "name": "database", 298 "type": "string" 299 }, 300 { 301 "name": "table", 302 "type": "string" 303 }, 304 { 305 "name": "tableID", 306 "type": "long" 307 }, 308 { 309 "name": "type", 310 "type": { 311 "type": "enum", 312 "name": "DMLType", 313 "symbols": [ 314 "INSERT", 315 "UPDATE", 316 "DELETE" 317 ] 318 } 319 }, 320 { 321 "name": "commitTs", 322 "type": "long" 323 }, 324 { 325 "name": "buildTs", 326 "type": "long" 327 }, 328 { 329 "name": "schemaVersion", 330 "type": "long" 331 }, 332 { 333 "name": "claimCheckLocation", 334 "type": [ 335 "null", 336 "string" 337 ], 338 "default": null 339 }, 340 { 341 "name": "handleKeyOnly", 342 "type": [ 343 "null", 344 "boolean" 345 ], 346 "default": null 347 }, 348 { 349 "name": "checksum", 350 "type": [ 351 "null", 352 "com.pingcap.simple.avro.Checksum" 353 ], 354 "default": null 355 }, 356 { 357 "name": "data", 358 "type": [ 359 "null", 360 { 361 "type": "map", 362 "values": [ 363 "null", 364 "int", 365 "long", 366 "float", 367 "double", 368 "string", 369 "boolean", 370 "bytes" 371 ], 372 "default": null 373 } 374 ], 375 "default": null 376 }, 377 { 378 "name": "old", 379 "type": [ 380 "null", 381 { 382 "type": "map", 383 "values": [ 384 "null", 385 "int", 386 "long", 387 "float", 388 "double", 389 "string", 390 "boolean", 391 "bytes" 392 ], 393 "default": null 394 } 395 ], 396 "default": null 397 } 398 ] 399 }, 400 { 401 "namespace": "com.pingcap.simple.avro", 402 "name": "Message", 403 "docs": "the wrapper for all kind of messages", 404 "type": "record", 405 "fields": [ 406 { 407 "name": "payload", 408 "type": [ 409 "com.pingcap.simple.avro.Watermark", 410 "com.pingcap.simple.avro.Bootstrap", 411 "com.pingcap.simple.avro.DDL", 412 "com.pingcap.simple.avro.DML" 413 ] 414 } 415 ] 416 } 417 ]