Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # set db variables
- jdbcUrl = "jdbc:postgresql://db.host.url:5432/db_name"
- username = "db_username"
- pw = "db_password"
- # define query
- df_column_names <- c("id", "date", "datetime", "address", "name")
- df_query <- sprintf("SELECT %s FROM schema.table_name;",
- noquote(paste0(outcome_column_names, collapse = ",")))
- # read from db
- DF = read.jdbc(url = jdbcUrl,
- tableName = df_query,
- partitionColumn = "id",
- user = username,
- password = pw)
- Error: Error in jdbc : argument is of length zero
Add Comment
Please, Sign In to add comment