prestodb / RPresto

DBI-based adapter for Presto for the statistical programming language R.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

retrieve data from RPresto

alasalameh opened this issue · comments

when i try to retrieve data using RPresto i receive the following error:

Error: lexical error: invalid char in json text.
!DOCTYPE HTML PUBLIC "-//W3C//
(right here) ------^

My code:
library(httr)
library(jsonlite)
library(DBI)
library(RPresto)
con <- dbconnect(RPresto::Presto(), host='http://20.25.12.12', port = 8787, user ='hdfs', catalog= 'hive', schema='logsdata', source= 'RPresto')
res <- RPresto::dbListtables(con,'%tbl%')
getRes <- RPresto::dbGetQuery(con,'SELECT * FROM tbl_Logs')

Thanks in advance.

Which version of RPresto are you using? Could you verify you have the latest?

Also, please verify you don't have http_proxy and https_proxy variables set. In other words, verify you are not going through a proxy.

Thanks for your response, the issue was related to proxy settings, I add Presto server IP to no_proxy variable and it's working fine now.