Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema with Nested Translation Data Sync from PostgreSQL to Elasticsearch #572

Open
lxup opened this issue Aug 24, 2024 · 0 comments
Open

Comments

@lxup
Copy link

lxup commented Aug 24, 2024

PGSync version: 3.2.0

Postgres version: 15.1

Elasticsearch/OpenSearch version: 8.15.0

Redis version: 7.2.5

Python version: 3.9

Problem Description:

I have two PostgreSQL tables, tmdb_movie and tmdb_movie_translation, that I'd like to sync with Elasticsearch using PGSync. The goal is to create two Elasticsearch indexes, movies_en and movies_fr, with the translation data (tmdb_movie_translation) nested directly within the parent movie data (tmdb_movie).

Table Structure:

  • tmdb_movie contains general movie information (e.g., id, original_title, release_date, etc.).
  • tmdb_movie_translation contains language-specific information (e.g., title, overview, poster_path, etc.) and is linked to tmdb_movie via a foreign key on movie_id.

Desired Elasticsearch Index Structure:

  • For each movie in the tmdb_movie table, I want to include the corresponding translation data from tmdb_movie_translation directly in the parent document under fields like title, overview, and poster_path.
  • The movies_en index should contain English translations, and the movies_fr index should contain French translations.

I'm looking for guidance on how to configure PGSync to achieve this nested structure. Thx a lot (Im a student so sry if my explanation are quite inexact) ! 😁

Error Message (if any):



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant