Table of Contents

Search

  1. Preface
  2. Introduction to Informatica Data Engineering Integration
  3. Mappings
  4. Mapping Optimization
  5. Sources
  6. Targets
  7. Transformations
  8. Python Transformation
  9. Data Preview
  10. Cluster Workflows
  11. Profiles
  12. Monitoring
  13. Hierarchical Data Processing
  14. Hierarchical Data Processing Configuration
  15. Hierarchical Data Processing with Schema Changes
  16. Intelligent Structure Models
  17. Blockchain
  18. Stateful Computing
  19. Appendix A: Connections Reference
  20. Appendix B: Data Type Reference
  21. Appendix C: Function Reference

Rules and Guidelines for Hive Targets on the Blaze Engine

Rules and Guidelines for Hive Targets on the Blaze Engine

You can include Hive targets in an Informatica mapping that runs on the Blaze engine.
Consider the following rules and guidelines when you configure a Hive target in a mapping that runs on the Blaze engine:
  • Mappings that run on the Blaze engine can read and write to sorted targets.
  • The Blaze engine supports Hive tables that are enabled for locking.
  • The Blaze engine can create or replace Hive target tables.
  • If you enable the Write transformation to maintain row order for a Hive target, the Blaze engine does not maintain row order.
  • A mapping that runs on the Blaze engine can have partitioned and bucketed Hive tables as targets. However, if you append data to a bucketed table, the Blaze engine overwrites the data in the bucketed target.
  • When a mapping writes to a partitioned Hive target, the impersonation user who runs the mapping must have the
    ALL
    privilege on the target table. The Blaze engine uses the 'MSCK REPAIR TABLE' command to write to a partitioned Hive target and
    ALL
    privilege is required to run the command.
  • To write to a Hive ACID table, the mapping must contain an Update Strategy transformation connected to the Hive target. The update strategy expression must flag each row for insert.
  • You cannot use update or delete update strategy properties.

RCFile as Hive Tables

The Blaze engine can read and write to RCFile as Hive tables. However, the Blaze engine supports only the ColumnarSerDe. In Hortonworks, the default SerDe for an RCFile is LazyBinaryColumnarSerDe. To read and write to an RCFile table, you must create the table by specifying the SerDe as
org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe
.
For example:
CREATE TABLE TEST_RCFIle (id int, name string) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe' STORED AS RCFILE;
You can also set the default RCFile SerDe in Apache Ambari, Cloudera Manager, or Amazon EMR distribution. Set the property
hive.default.rcfile.serde
to
org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe
.

Compressed Hive Tables

The Blaze engine can read and write to Hive tables that are compressed. However, to read from a compressed Hive table or write to a Hive table in compressed format, you must set the
TBLPROPERTIES
clause as follows:
  • When you create the table, set the table properties:
    TBLPROPERTIES ('property_name'='property_value')
  • If the table already exists, alter the table to set the table properties:
    ALTER TABLE table_name SET TBLPROPERTIES ('property_name' = 'property_value');
The property name and value are not case sensitive. Depending on the file format, the table property can take different values.
The following table lists the property names and values for different file formats:
File Format
Table Property Name
Table Property Values
Avro
avro.compression
BZIP2, deflate, Snappy
ORC
orc.compress
Snappy, ZLIB
Parquet
parquet.compression
GZIP, Snappy
RCFile
rcfile.compression
Snappy, ZLIB
Sequence
sequencefile.compression
BZIP2, GZIP, LZ4, Snappy
Text
text.compression
BZIP2, GZIP, LZ4, Snappy
The Blaze engine does not write data in the default ZLIB compressed format when it writes to a Hive target stored as ORC format. To write in a compressed format, alter the table to set the TBLPROPERTIES clause to use ZLIB or Snappy compression for the ORC file format.
The following text shows sample commands to create table and alter table:
  • Create table:
    create table CBO_3T_JOINS_CUSTOMER_HIVE_SEQ_GZIP (C_CUSTKEY DECIMAL(38,0), C_NAME STRING,C_ADDRESS STRING, C_PHONE STRING,C_ACCTBAL DECIMAL(10,2), C_MKTSEGMENT VARCHAR(10),C_COMMENT vARCHAR(117)) partitioned by (C_NATIONKEY DECIMAL(38,0)) TBLPROPERTIES ('sequencefile.compression'='gzip') stored as SEQUENCEFILE;
  • Alter table:
    ALTER TABLE table_name SET TBLPROPERTIES (avro.compression'='BZIP2');

0 COMMENTS

We’d like to hear from you!