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

confusion on how to create config by joining table with a single document_type #64

Open
ericnilo opened this issue Nov 9, 2016 · 2 comments

Comments

@ericnilo
Copy link

ericnilo commented Nov 9, 2016

How can write this in config, I want to join table and should be only one document_type named application

SELECT
    ap.associate_person_id,
    ap.person_id,
    ap.is_registrant,
    ms.ms_application_id,
    ai.application_name,
    s.service,
    s.service_id,
    aso.application_status_option,
    ai.trash,
    ai.created AS created_date
FROM associate_person ap
    LEFT JOIN ms_application ms ON ms.ms_application_id = ap.ms_application_id
    LEFT JOIN application_index ai ON ai.ms_application_id = ms.ms_application_id
    LEFT JOIN application_status aps ON aps.application_status_id = ai.application_status_id
    LEFT JOIN service s ON s.service_id = ai.service_id
    LEFT JOIN application_status_option aso ON aso.application_status_option_id = aps.application_status_option_id;

How can I achieve this?

@ericnilo ericnilo changed the title confusion on how to create config by joining table confusion on how to create config by joining table with a single document_type Nov 9, 2016
@siddontang
Copy link
Collaborator

Seem we can't do it.
go-mysql-elasticsearch can only sync data from binlog.

@ericnilo
Copy link
Author

Oh see, this means that schema of the database (mysql) should be the same structure with the document types of the elasticsearch

Thanks 👍, btw, great proj.

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

2 participants