본문 바로가기

내가 당면한 문제와 해결방안

logstash conf :sql_last_value

jdbc {
	jdbc_connection_string => "상동"
    jdbc_user => "username"
    jdbc_password => "atlaspw"
    jdbc_driver_library => ""
	jdbc_validate_connection => true
    schedule => "*/10 * * * *"
    statement => "SELECT region_id, region_type, country_code, country_code_3, source_from, st_asgeojson(center_geo_point)::text as center_geo_point_text,
    center_longitude, center_latitude, jsonn::text from expedia_region_union where
    source_Timestamp + interval '9 hours' > :sql_last_value"
    tracking_column => "source_timestamp"
    tracking_column_type => "timestamp"
    use_column_value => true
    clean_run => false
    last_run_metadata_path => "/usr/share/logstash/.logstash_jdbc_last_run"
    tags => ["expedia_region_union"]
}

.logstash_jdbc_last_run 파일은.

한번 전체 테이블을 가져오고 난 다음에야 생성이 됨.

이 파일을 한번 지웠다가.

다시 만들어지지 않아서 직접 만들기도 했는데 그럴필욘없고.

지웠다가 다시 만들고싶으면 한번 테이블을 다 가져오기를..