|
| 1 | +from base64 import b64encode |
1 | 2 | from typing import List
|
2 | 3 |
|
3 | 4 | import pendulum
|
4 | 5 | from dlt.common import Decimal
|
5 |
| -from dlt.common.data_types.typing import DATA_TYPES |
6 | 6 | from dlt.common.schema import TColumnSchema, TTableSchema, TTableSchemaColumns
|
7 | 7 | from dlt.common.typing import TDataItem
|
8 | 8 |
|
|
259 | 259 | },
|
260 | 260 | ],
|
261 | 261 | },
|
| 262 | + { |
| 263 | + "transactionId": 754, |
| 264 | + "commitTime": "1736873892023448", |
| 265 | + "table": "src_pl_dataset_202501140458116348.data_types", |
| 266 | + "op": "INSERT", |
| 267 | + "newTuple": [ |
| 268 | + {"columnName": "bit_col", "columnType": 1560, "datumString": "1"}, |
| 269 | + { |
| 270 | + "columnName": "box_col", |
| 271 | + "columnType": 603, |
| 272 | + "datumBytes": b64encode(b"(1,1),(0,0)").decode(), |
| 273 | + }, |
| 274 | + { |
| 275 | + "columnName": "uuid_col", |
| 276 | + "columnType": 2950, |
| 277 | + "datumString": "6e1f5de1-1093-4bfe-98e4-62ac56b2db54", |
| 278 | + }, |
| 279 | + { |
| 280 | + "columnName": "text_a", |
| 281 | + "columnType": 1009, |
| 282 | + "datumBytes": b64encode(b"{a,b}").decode(), |
| 283 | + }, |
| 284 | + ], |
| 285 | + "newTypeinfo": [ |
| 286 | + { |
| 287 | + "modifier": "bit(1)", |
| 288 | + "valueOptional": True, |
| 289 | + }, |
| 290 | + { |
| 291 | + "modifier": "box", |
| 292 | + "valueOptional": True, |
| 293 | + }, |
| 294 | + { |
| 295 | + "modifier": "uuid", |
| 296 | + "valueOptional": True, |
| 297 | + }, |
| 298 | + { |
| 299 | + "modifier": "text[]", |
| 300 | + "valueOptional": True, |
| 301 | + }, |
| 302 | + ], |
| 303 | + "oldTuple": [], |
| 304 | + }, |
262 | 305 | ]
|
263 | 306 |
|
264 | 307 | DATA_ITEMS: List[TDataItem] = [
|
|
309 | 352 | "_pg_commit_ts": pendulum.parse("2024-10-19T00:56:23.354856+00:00"),
|
310 | 353 | "_pg_tx_id": 932,
|
311 | 354 | },
|
| 355 | + { |
| 356 | + "bit_col": "1", |
| 357 | + "box_col": "KDEsMSksKDAsMCk=", |
| 358 | + "uuid_col": "6e1f5de1-1093-4bfe-98e4-62ac56b2db54", |
| 359 | + "text_a": ["a", "b"], |
| 360 | + "_pg_lsn": 1, |
| 361 | + "_pg_commit_ts": pendulum.parse("2025-01-14T16:58:12.023448+00:00"), |
| 362 | + "_pg_tx_id": 754, |
| 363 | + }, |
312 | 364 | ]
|
313 | 365 |
|
314 | 366 | TABLE_SCHEMAS: List[TTableSchema] = [
|
|
417 | 469 | },
|
418 | 470 | },
|
419 | 471 | },
|
| 472 | + { |
| 473 | + "name": "data_types", |
| 474 | + "columns": { |
| 475 | + "bit_col": {"data_type": "text", "name": "bit_col", "nullable": True}, |
| 476 | + "box_col": {"data_type": "text", "name": "box_col", "nullable": True}, |
| 477 | + "uuid_col": {"data_type": "text", "name": "uuid_col", "nullable": True}, |
| 478 | + "text_a": {"data_type": "json", "name": "text_a", "nullable": True}, |
| 479 | + "_pg_lsn": {"data_type": "bigint", "name": "_pg_lsn", "nullable": True}, |
| 480 | + "_pg_deleted_ts": { |
| 481 | + "data_type": "timestamp", |
| 482 | + "name": "_pg_deleted_ts", |
| 483 | + "nullable": True, |
| 484 | + }, |
| 485 | + "_pg_commit_ts": { |
| 486 | + "data_type": "timestamp", |
| 487 | + "name": "_pg_commit_ts", |
| 488 | + "nullable": True, |
| 489 | + }, |
| 490 | + "_pg_tx_id": { |
| 491 | + "data_type": "bigint", |
| 492 | + "name": "_pg_tx_id", |
| 493 | + "nullable": True, |
| 494 | + "precision": 32, |
| 495 | + }, |
| 496 | + }, |
| 497 | + }, |
420 | 498 | ]
|
0 commit comments