I am trying to write data to a table in a particular schema in HANA (SPS 11) using RODBC package in R and am having problems that I hope someone can help with.
I am using the sqlSave to create the file and write to it, using below command, but getting weird results.
res <- sqlSave(ch, dim_product_master_test, tablename = table.for.save, rownames = FALSE, verbose = TRUE)
Query: CREATE TABLE MYSCHEMA."DIM_PRODUCTSX" ("ProdSrcMonth" varchar(255), "Category" varchar(255), "SubCategory" varchar(255), "Brand" varchar(255), "Material" INTEGER, "Product" varchar(255), "EAN" varchar(255) .... etc)
I am getting the error:
Error in sqlColumns(channel, tablename) : ‘MYSCHEMA."DIM_PRODUCTSX"’: table not found on channel
However, the table is being created, then it can't seem to add the data or find it.
I tried with different quotes scheme (including around the schema name) but same result.
Query: CREATE TABLE "MYSCHEMA"."DIM_PRODUCTSY" ("ProdSrcMonth" varchar(255), "Category" varchar(255), "SubCategory" varchar(255), "Brand" varchar(255), "Material" INTEGER, "Product" varchar(255), "EAN" varchar(255) ... etc
Error in sqlColumns(channel, tablename) : ‘"MYSCHEMA"."DIM_PRODUCTSY"’: table not found on channel
Tried quoting both, but no difference. Again, creates table but cannot update it.
If I just throw the dataframe at sqlSave, it happily creates the table and adds the data but I need more control that that.
Also, anyone know how to create column store tables? seems to default to row store.
Thanks in advance.