Member since
11-30-2020
5
Posts
1
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2566 | 12-10-2021 02:14 PM |
04-22-2022
09:09 PM
I am using CDWS version 1.9.1.10118148 (81531c5), the odbc package did not work for me with any version of R, 3.6, 4.0 or 4.1
... View more
04-20-2022
06:04 PM
I am trying to install the odbc package in r using the command install.packages("odbc"), however an error is generated and the package does not install. Any help is welcome.
... View more
Labels:
12-10-2021
02:14 PM
1 Kudo
It is already solved, it was only missing in the CREATE TABLE to add the sandbox path CLD_ML_BI_ENG.iris dbExecute(conn = con_Hive,
statement = "CREATE EXTERNAL TABLE CLD_ML_BI_ENG.iris(sepal_length double, sepal_width double, petal_length double, petal_width double, species varchar(10))
ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.orc.OrcSerde'
STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
LOCATION '/sandbox/CLD_ML_BI_ENG/iris'")
... View more
11-10-2021
05:03 PM
I am trying to create a table using the CREATE TABLE statement, in hue it works perfectly but when I use the dbexecute function in r, I get an error. How could it be solved. library(DBI)
library(odbc)
con_Hive <- dbConnect(odbc::odbc(), "Hive_produccion", database = "cld_ml_bi_eng", encoding = "latin1")
con_Hive
dbExecute(conn = con_Hive, statement = "CREATE EXTERNAL TABLE iris(sepal_length double,
sepal_width double,
petal_length double,
petal_width double,
species varchar(10))
LOCATION '/sandbox/CLD_ML_BI_ENG/iris'")
Error: nanodbc/nanodbc.cpp:1655: 42000: [Cloudera][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query. Error message from server: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [RDIAZ] does not have [CREATE] privilege on [default/iris]
<SQL> 'CREATE EXTERNAL TABLE iris(sepal_length double,
sepal_width double,
petal_length double,
petal_width double,
species varchar(10))
LOCATION '/sandbox/CLD_ML_BI_ENG/iris'
... View more
Labels:
- Labels:
-
Apache Hive
-
Cloudera Hue
11-10-2021
04:43 PM
I am using Rstudio and I need to save some tables in my sandbox, however I cannot specify the location, because by default we send the tables to the path: hdfs: //haprod/warehouse/tablespace/managed/hive/cld_ml_bi_eng.db/iris How can I specify the location when writing the table is in the LOCATION '/sandbox/CLD_ML_BI_ENG/iris' library(DBI)
library(odbc)
con_Hive <- dbConnect(odbc::odbc(), "Hive_produccion", database = "cld_ml_bi_eng", encoding = "latin1")
colnames(iris) <- gsub(pattern = "\\.", replacement = "_", x = colnames(iris))
dbWriteTable(conn = con_Hive, name = Id(schema = "cld_ml_bi_eng", table = "iris"), value = iris) LOCATION '/sandbox/CLD_ML_BI_ENG/iris'
... View more
Labels:
- Labels:
-
Apache Hive
-
Cloudera Hue