Skip to content

Commit

Permalink
feat(postgresql config): remove requirement of schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhhhhhhhhe committed Jan 21, 2022
1 parent 761b7b9 commit 8bdff07
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,6 @@ object Configs {
config.getString("host"),
config.getInt("port"),
config.getString("database"),
config.getString("schema"),
config.getString("table"),
config.getString("user"),
config.getString("password"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ case class PostgresSQLSourceConfigEntry(override val category: SourceCategory.Va
host: String,
port: Int,
database: String,
schema: String,
table: String,
user: String,
password: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ class ConfigsSuite {
assert(postgresql.port == 5432)
assert(postgresql.user.equals("root"))
assert(postgresql.password.equals("nebula"))
assert(postgresql.schema.equals("public"))
assert(postgresql.database.equals("database"))
assert(postgresql.table.equals("table"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class PostgreSQLReader(override val session: SparkSession, postgreConfig: Postgr
val df = session.read
.format("jdbc")
.option("url", url)
.option("dbtable", s"${postgreConfig.schema}.${postgreConfig.table}")
.option("dbtable", postgreConfig.table)
.option("user", postgreConfig.user)
.option("password", postgreConfig.password)
.load()
Expand Down

0 comments on commit 8bdff07

Please sign in to comment.