Update JDBC Database table using storage handler and Hive - hadoop

I have read that using Hive JDBC storage handler
(https://github.com/qubole/Hive-JDBC-Storage-Handler),
the external table in Hive can be created on different databases (MySQL, Oracle, DB2) and users can read from and write to JDBC databases using Hive using this handler.
My question is in the update .
If we use hive.14 where Hive update/delete is supported and use storage handler to point an external table to a JDBC database table, will it allow us to update the database table as well when we fire the update query from Hive end?

You can not update an external table in hive.
In hive only transcational tables support ACID properties. By default transactions are configured to be off. So to create transaction tables you need to add 'TBLPROPERTIES ('transactional'='true')' in your create statement.
There are many limitations to it. One of which is you cannot make external tables to be an ACID table because external tables are beyond the control of hive compactor.
To read more on this click here

Related

How to connect to data source in HUE?

I have been given access to HUE Hive platform by my client. I have also raised all the access requests for the database and all of them are approved also. But I can't see any databases or tables in the Hive interface. Is there any procedure to connect to a database or it should reflect on the Hive interface automatically?

Creating table on kudu through impala jdbc

I am trying to create table on kudu through impala jdbc by URL
jdbc:impala://host:21050/default;AuthMech=0;UID=impala;
but error appears Table owner must not be null or empty.
any help?
Create table on kudu through impala jdbc need authentication function like LDAP or Kerberos.You need to install one of them and configure it.

Apache Drill - Not listing tables in Hive DB

I have created the necessary storage plugins and the relevant databases in hive show up when issuing the show database command.
When using one of the hive databases though using the use command, I found that I cannot select any tables which are within that database. Looking further, when issuing the show table command, no tables within that database show up via Apache Drill whereas they appear fine in Hive.
Is there anything I am missing by any chance in terms of granting permission via Hive to any user? How exactly does Apache Drill connect to Hive to run the relevant jobs?
Appreciate your responses.
Show tables; will not list hive tables as of now. It's better to create views on top of hive tables. These Views will show up on show tables; command.

Creating user with password Authentication at Presto Database

I Have a presto Database.
I want to create a new user which will be used by creating a connection via JDBC connection
I was searching this link
for creating user syntax
this is the only create options it has
8.5. CREATE SCHEMA
8.6. CREATE TABLE
8.7. CREATE TABLE AS
8.8. CREATE VIEW
The CREATE SCHEMA doesn't appear to have the ability for it - it also doesn't appear to have IDENTIFIED BY syntax.
How can I create a user with a password for Presto?
Presto does not have the notion of users or storage of its own. It relies on the underlying data source. Which connectors are you using? If you're using the Hive connector, then depending on how it's configured you could connect as a particular Hive user.

connect PostgreSql to Oracle live

I have a PostgreSql database and I need to connect it to read data from oracle view and store that data in custom table
The PostgreSql database will connect to oracle everyday automatically to read the latest updates from oracle view
How to create it?
It sounds like you probably want a SQL/MED foreign data wrapper. Check out oracle_fdw. You could also use the generic odbc_fdw or jdbc_fdw wrappers via Oracle's ODBC or JDBC drivers.
Another option is DBI-Link.
Combine these with a cron job if you want to copy to a local view.

Resources