So far, I am able to write a single line SQL in logstash pipelines and it's working fine.
However, How do I write multiline SQL with single-quotes (') in the SQL? I tried with a backslash for continuation, but the pipeline is not being invoked when I look at the logs.
For instance:
How do I write the following sql in pipeline.
Select a.col1,b.col2
from tab1 a, tab2 b
where a.col3='something'
and a.col4=b.col4;
No, I do not care how many lines you spread the SQL across. As I said before, if the pipeline is not running then logstash almost certainly logged an error. What do you see in the logs?
I left the index_type and document_type the same and just changed the id in the pipeline. The first pipeline has multisql, the one that followed had a single line.
So I think it was getting overwritten. So I did not see any errors also.
Upon taking a closer look I figured this issue and corrected it.
It worked perfectly. Including predicates with quotes (').
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.