Skip to content

How to specify Schema Name in Logstash config input for postgreSQL? #377

@yash-bhardwaj

Description

@yash-bhardwaj

For below config:

{
input {
    jdbc {
	jdbc_validate_connection => true
        jdbc_connection_string => "jdbc:postgresql://127.0.0.1:5433/Wallet_DB"
	jdbc_user => "postgres"
	jdbc_password => "postgres"
	jdbc_driver_library => "D:/softwares/logstash-7.6.0/logstash-core/lib/jars/jdbc-postgresql.jar"
	jdbc_driver_class => "org.postgresql.Driver"
	statement => "SELECT * FROM schema.customer_wallet_details"
    }
}

I'm Getting Error:

[ERROR][logstash.inputs.jdbc     ][main] Java::OrgPostgresqlUtil::PSQLException: ERROR: relation "schema.customer_wallet_details" does not exist: SELECT * FROM schema.customer_wallet_details
[WARN ][logstash.inputs.jdbc     ][main] Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::OrgPostgresqlUtil::PSQLException: ERROR: relation "schema.customer_wallet_details" does not exist>}

I saw an example sql for the same in documentation, but it simply doesn't work.

@elasticsearch-bot please guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions