When loading the dump, this question is broken, here is the dataset_query created after loading the dump. Please notice source-table value inside Joins key is not numeric
Hi @rodxyz
Please post “Diagnostic Info” from Admin > Troubleshooting.
I have no idea what you’re doing or trying to do, so perhaps you should start with explaining that.
@rodxyz
When using the Enterprise Edition, please contact support via email.
Latest release is 1.35.4.1
Do you see any errors during the load? I’m going to try to reproduce.
@mksrom When using the Enterprise Edition, please contact support via email.
There’s a lot of work being done to Serialization right now and will likely ship in 1.38.1
@mksrom Please use the support email, so the problem can be connected to your company and prioritized, and we are able to update you when the issue is fixed (or contact if we need further information to fix).
You can use the following query that you need to run the target instance after the Serialization load.
Run it until there’s no more rows to update - that’s a Postgres limitation.
Make sure to always do backups for change application database data manually.
UPDATE report_card
SET dataset_query=REGEXP_REPLACE(dataset_query, lookup.findstr, lookup.replacestr)
FROM (
WITH wrongref AS (
SELECT rc.id, REGEXP_MATCH(rc.dataset_query, '"source-table":("/databases/([^/]+)/schemas/([^/]+)/tables/([^"]+)")') AS findstr
FROM report_card AS rc WHERE rc.dataset_query LIKE '%"source-table":"/databases/%'
)
SELECT
wrongref.id,
concat('"source-table":', wrongref.findstr[1]) AS findstr,
concat('"source-table":', (
SELECT mt.id::varchar FROM metabase_database AS md LEFT JOIN metabase_table AS mt ON mt.db_id=md.id WHERE md."name"=wrongref.findstr[2] AND mt."schema"=wrongref.findstr[3] AND mt."name"=wrongref.findstr[4])
) AS replacestr
FROM wrongref
) AS lookup
WHERE report_card.id=lookup.id