SIGN IN SIGN UP

feat: Support table name changes on basic transformer. (#18833)

Adds a new transformation kind to the basic transformer that enables renaming tables.

Used like:

```yaml copy
      - kind: change_table_names
        tables: ["*"]
        new_table_name_template: "c_{{.OldName}}"
```

Unfortunately, `sync_v3` has to be updated to support this transformation, because the sync process deletes stale rows, and it supplies the old table names, and there's no way to ask the transformer how did you change the names.

Therefore, I added a very small `tableNameChanger` that learns table name changes by sniffing schema bytes on `TransformSchema` calls (via `MigrateTableMessage`), and updates the names where it needs to.

<img width="721" alt="Screenshot 2024-08-02 at 15 03 53" src="https://github.com/user-attachments/assets/a238b617-f73c-4f92-a544-4caa53737eda">
<img width="1489" alt="Screenshot 2024-08-02 at 15 04 02" src="https://github.com/user-attachments/assets/d56fcf01-9e21-4655-a248-bfb4a5d382ce">
<img width="534" alt="Screenshot 2024-08-02 at 15 04 27" src="https://github.com/user-attachments/assets/0dffcea3-232f-416e-9512-6ea440f4c707">
M
Mariano Gappa committed
67d3701e6e49d6dcbb7844cc654ae8fe2223d6ad
Parent: b24afab
Committed by GitHub <noreply@github.com> on 8/2/2024, 3:24:33 PM