Try the link here

Here is a copy of migration for two individual queries for logstash.conf:

input {
  jdbc {
    jdbc_connection_string => "jdbc:mysql://localhost:3306/testdb?useSSL=false&serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&rewriteBatchedStatements=true"
    # The user we wish to execute our statement as
    jdbc_user => "root"
    jdbc_password => "123456"
    # The path to our downloaded jdbc driver
    jdbc_driver_library => "E:\repo\mysql\mysql-connector-java\6.0.6\mysql-connector-java-6.0.6.jar"
    jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
    # our query
    statement => "SELECT * FROM click_tripadvisor where rid > :sql_last_value"
    use_column_value => true
    tracking_column => "rid"
    jdbc_page_size => 1000
    jdbc_paging_enabled => true
    type => "click_tripadvisor"
    last_run_metadata_path => "C:\users\dt295\click_tripadvisor.logstash_jdbc_last_run"
    }

  jdbc {
    jdbc_connection_string => "jdbc:mysql://localhost:3306/testdb?useSSL=false&serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&rewriteBatchedStatements=true"
    # The user we wish to execute our statement as
    jdbc_user => "root"
    jdbc_password => "123456"
    # The path to our downloaded jdbc driver
    jdbc_driver_library => "E:\repo\mysql\mysql-connector-java\6.0.6\mysql-connector-java-6.0.6.jar"
    jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
    # our query
    statement => "SELECT * FROM tracking_booking where id > :sql_last_value"
    use_column_value => true
    tracking_column => "id"
    jdbc_page_size => 1000
    jdbc_paging_enabled => true
    type => "tracking_booking"
    clean_run => "true"
    last_run_metadata_path => "C:\users\dt295\tracking_booking.logstash_jdbc_last_run"
    }
}
output {
  stdout { codec => json_lines }
  if[type] == "click_tripadvisor" {
    elasticsearch {
    "hosts" => "localhost:9200"
    "index" => "click_tripadvisor"
    "document_type" => "data"
    "document_id" => "%{rid}"
    }
  }

  if[type] == "tracking_booking" {
    elasticsearch {
    "hosts" => "localhost:9200"
    "index" => "tracking_booking"
    "document_type" => "tracking_booking"
    "document_id" => "%{id}"
    }
  }
}