Hello,
I'm trying to access a HANA instance from R, through the RODBC package. I defined my data source in my home directory's .odbc.ini file, the ODBC connection is then established from R, and i can consult the list of tables just fine, including the one i'm interested in:
> ch <- odbcConnect(dsn="hana", uid="SYSTEM", pwd="notmyrealpassword")
> tb <- sqlTables(ch)
> tb[tb$TABLE_SCHEM == "MOBILE_00",2:3]
TABLE_SCHEM TABLE_NAME
1519 MOBILE_00 workshop.mobile.00.data::denorm
However, i can't download this table into a R data frame or even do a simple 'select * from tablename' because i don't seem to have the table name right.
As seen in the code above, my "denorm" table is stored in the schema "MOBILE_00", and comes from a project stored in the repository, under the path "workshop.mobile.00.data::denorm". My first impression was that the full name for the table in the ODBC connection would be schemaname.tablename, so "MOBILE_00.workshop.mobile.00.data::denorm", but i get an error when using this:
> sqlFetch(ch, "MOBILE_00.workshop.mobile.00.data::denorm")
Error in odbcTableExists(channel, sqtable) :
‘MOBILE_00.workshop.mobile.00.data::denorm’: table not found on channel
I think my issue is an incorrect table name, but i'm not sure what's the correct table path format. All examples i could find online of RODBC access simply used the table name (so in my case that would be "denorm"), but they all seemed to be stored at the repository's root from what i could gather from the screenshots.
If anyone can tell me what i'm doing wrong, it'd be much appreciated!
Regards,
Bruno.