I'm using the 8.15 free trial and want to retrieve data from MySQL.
I'm using the MySQL connector and in the Configuration, I add some tables under Comma-separated list of tables. On sync, all the rows of the tables are correctly indexed.
I want to index the result of a sql statement, one having multiple inner joins. You cannot add the statement under comma-separated list of tables. I tried to add it in the Sync rules, but it didn't pass the validation rules.
I then created a view from that statement in MySQL and used the view name in the Configuration/list of tables. No errors on sync but no documents have been indexed.
I then created a table from that statement in MySQL. I can see and use select in MySQL on that table name. But when I use that table name in the Configuration/List of tables, no errors on sync, but nothing has been indexed.
How can I index a sql statement using the MySQL connector?
Thanks for your response.
And I could get my sql statement to work on the condition that you define the same tables in Configuration.
I do have now another interesting problem.
Running my sql statement in MySQL results in 384 rows. However, Elastic only ingest 1 document (the last one).
This is a part of the sql statement:
, min(case when (project_property_definition_id = 135) then coalesce(value_int, value_float, value_double, value_string, value_datetime) else null end) as client_reference
from project_properties
group by project_id;
In Documents, it shows only 1 ingested document, the last one, with this reference: Document id: project_properties_
It looks that it overwrites the documents.
How can I ensure that each mysql row will be 1 document?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.