toluaina / pgsync

Postgres to Elasticsearch/OpenSearch sync
https://pgsync.com
MIT License
1.15k stars 180 forks source link

postgis view sync #349

Open askatmaster opened 1 year ago

askatmaster commented 1 year ago

PGSync version:

Postgres version:

Elasticsearch version:

Redis version:

Python version:

Problem Description: I beg you, please give schema.json for this view. I can't set up the schema image

Error Message (if any):

toluaina commented 1 year ago

Can you provide details of your database schema? i.e the tables you want to pull data from?

askatmaster commented 1 year ago

image

toluaina commented 1 year ago

I don't have your full db schema or the full picture but I think you can start with this sort of scheme.json

[
    {
        "database": "foo",
        "index": "bar",
        "nodes": {
            "table": "partners",
            "columns": [],
            "children": [
                {
                    "table": "tags",
                    "columns": [],
                    "relationship": {
                        "variant": "object",
                        "type": "one_to_many",
                        "through_tables": [
                            "partner_tags"
                        ]
                    }
                }
            ]
        }
    }
]