Connect R and Netezza using RJDBC

后端 未结 2 577
孤街浪徒
孤街浪徒 2021-01-23 08:23

I´m trying to connect R with Netezza using the JDBC driver.

I manage to connect succesfully with the database, but the results are not corretc.

# Here ar         


        
2条回答
  •  借酒劲吻你
    2021-01-23 09:04

    I scrolled your output all the way to the right and it looks like the strings in your columns are very wide (are they CHAR instead of VARCHAR?), so the result does not fit the width of R console. Hence R displays them that way.

    So try to either trim them in your query

    select rtrim(SUB_ACCOUNT_ID), ...
    

    or in R:

    require('stringr')
    res$SUB_ACCOUNT_ID <- str_trim(res$SUB_ACCOUNT_ID)
    

提交回复
热议问题