Managed Table
these are defualt table of hive which are managed by warehouse system.
Managed tabular data will get stored in ware house.
HDFS PATH : /user/hive/warehouse/<<tablename>>/tabledata
How to create managed table
Syntax : Create table <<tablename>> <schema def>>
row format delimitedfields terminated by '|'lines terminated by '\n'stored as filename;There are two way to load the data- local path (load data local inpath 'local path' into table tablename )
- HDFS path (load data inpath 'HDFS PATH' into table tablename)
Once the data loaded from any way it will be a part of HDFS only/user/hive/warehouse
ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language.
Monday, May 11, 2015
chapte 04 : type of tables in hive
Types of table in hive
Chapter 02 :Metastore and how to configure it
METASTORE
Internal database of hive which is primarially responsible for keeping the metadata information of the table like table name, table schema, table column information, partitioned key information if any.
Note
By default hive will come up with the DERBY database , however we can also configure mysql like THRIFT SERVER extra as hive metastore.
HOW TO CONFIGURE METASTORE IN HIVE
There are two section :-
- Connection URLHive-site.xml<property>
<name>javax.dbo.option.connectionURL</name>
<value>jdbc.derby; databasename =/var/lib/hive/metastore/metastore_db; create =true;</value>
<description>Connectionstring for JDBC metastore</description>
</property>
- Driver Class DetailsHive-site.xml<property>
<name>javax.dbo.option.ConnectionDriverName</name>
<value>org.apache.derby.jdbc.EmbeddedDriver</value>
<description>Driver Class name for JDBC metastore</description>
</property>
metastore is generallly one of the configuaration file.
Apache Hive Introduction
Note : Even though we are querying in hive each and every job is internally converted into MR job only.
Hive is not come with default installation of hadoop we need to install it exclusively on hadoop boxes.
Friday, May 8, 2015
Script Mode : Join Script in Apache Pig
A = LOAD 'data1.txt' using PigStorage('\t') as (cid:int,name:chararray,place:chararray);
B = LOAD 'data2.txt' using PigStorage('\t') as (cid:int,name:chararray,place:chararray);
joindata = JOIN A By cid,B By cid;
rjoin = JOIN A By cid RIGHT,B By cid;
ljoin = JOIN A By cid LEFT,B By cid;
Fjoin = JOIN A By cid FULL,B BY cid;
DUMP rjoin;DUMP ljoin;DUMP Fjoin;
B = LOAD 'data2.txt' using PigStorage('\t') as (cid:int,name:chararray,place:chararray);
joindata = JOIN A By cid,B By cid;
rjoin = JOIN A By cid RIGHT,B By cid;
ljoin = JOIN A By cid LEFT,B By cid;
Fjoin = JOIN A By cid FULL,B BY cid;
DUMP rjoin;DUMP ljoin;DUMP Fjoin;
Subscribe to:
Posts (Atom)






