Open ravin-accelq opened 1 year ago
Looks like it only checks for table being in one of the tables in schema.json file.
So in case like pg_1_schema has a table named user
. And if there is another pg_2_schema which also has table named user
. It will try to sync it also.
Ideally it should check for postgres schema is present in schema.json file.
I believe this is what it's doing. Can you share your schema.json to get a better idea of what's going on?
[{ "database":"accelq_db", "index":"demo_scenario", "plugins":[ "CleanScenarioField" ], "nodes":{ "table":"scenario", "schema":"demo_schema", "primary_key":["pid"], "columns":[], "children":[ { "table":"project", "schema":"demo_schema", "primary_key":["pid"], "columns":[], "transform":{ "rename":{ "project_name":"code", "project_display_name":"display_name" } }, "relationship":{ "variant":"object", "type":"one_to_one", "foreign_key":{ "child":["pid"], "parent": ["pj_pid"] } } }, { "table":"users", "label":"user_created", "schema":"demo_schema", "primary_key":["pid"], "columns":[], "relationship":{ "variant":"object", "type":"one_to_one", "foreign_key":{ "child":["pid"], "parent": ["created_user"] } } }, { "table":"users", "label":"user_last_modified", "schema":"demo_schema", "primary_key":["pid"], "columns":[], "relationship":{ "variant":"object", "type":"one_to_one", "foreign_key":{ "child":["pid"], "parent": ["last_modified_user"] } } }, { "table":"conf_entity_status", "schema":"demo_schema", "label":"status", "primary_key":["pid"], "columns":[], "transform":{ "rename":{ "status_name":"name" } }, "relationship":{ "variant":"object", "type":"one_to_one", "foreign_key":{ "child":["pid"], "parent": ["status_pid"] } } }, { "table":"lu_cross_project_sharing_type", "schema":"demo_schema", "primary_key":["pid"], "label":"cross_project_sharing_type", "columns":[], "relationship":{ "variant":"object", "type":"one_to_one", "foreign_key":{ "child":["pid"], "parent": ["cross_project_sharing_type_pid"] } } }, { "table":"lu_test_type", "schema":"demo_schema", "label":"test_type", "primary_key":["pid"], "columns":[], "relationship":{ "variant":"object", "type":"one_to_one", "foreign_key":{ "child":["pid"], "parent": ["test_type_pid"] } } }, { "table":"metadata_value", "schema":"demo_schema", "primary_key":["pid"], "columns":[], "children":[ { "table":"project", "schema":"demo_schema", "primary_key":["pid"], "columns":["pid"], "relationship":{ "variant":"object", "type":"one_to_one", "foreign_key":{ "child":["pid"], "parent": ["pj_pid"] } } } ], "relationship":{ "variant":"object", "type":"one_to_one", "foreign_key":{ "child":["pid"], "parent": ["mv_pid"] } } }, { "table":"conf_metadata", "schema":"demo_schema", "primary_key":["pid"], "columns":[], "children":[ { "table":"conf_entity_metadata", "schema":"demo_schema", "primary_key":["pid"], "columns":[], "children":[{ "table":"lu_top_entity_type", "schema":"demo_schema", "primary_key":["pid"], "columns":[], "relationship":{ "variant":"object", "type":"one_to_one", "foreign_key":{ "child":["pid"], "parent": ["lu_top_entity_type_pid"] } } }], "relationship":{ "variant":"object", "type":"one_to_many", "foreign_key":{ "child":["conf_metadata_pid"], "parent": ["pid"] } } } ], "relationship":{ "variant":"object", "type":"one_to_many", "foreign_key":{ "child":["pj_pid"], "parent": ["pj_pid"] } } }, { "table":"scn_reln_scenario_ext_int_work_item", "label":"traceability", "schema":"demo_schema", "primary_key":["pid"], "columns":[], "children":[ { "table":"ext_int_work_item", "label":"work_item", "schema":"demo_schema", "primary_key":["pid"], "columns":[], "relationship":{ "variant":"object", "type":"one_to_one", "foreign_key":{ "child":["pid"], "parent": ["ext_int_work_item_pid"] } } } ], "relationship":{ "variant":"object", "type":"one_to_many", "foreign_key":{ "child":["scn_pid"], "parent": ["pid"] } } } ] } }]
PGSync version: 2.5.0
Postgres version: 10
Elasticsearch version: 8.6.2
Redis version: 6.0.16
Python version: 3.11.2
Problem Description: I've configured the schema.json file to sync for
accelq_schema
of Postgres. But when there is no new data to sync, it goes to other schema's in Postgres and tries to sync them. But when there is data to sync it works fine.Error Message (if any):