Define Hive Partitions
Use the Hive Table Partition Editor to define table partitions in a Hive physical model.
To define a Hive partition
- In the Model Explorer, under Tables right-click Partitions and click New.
An instance of Partition is created.
- Right-click the instance and click Properties.
The Hive Table Partition Editor opens.
- In the navigation grid, select the partition that you want to define and work with the following options:
Note: Click New
on the toolbar to create a partition. Use the Enter filter text box to filter a very large list of always encrypted keys to quickly locate the one that you want to define.
- Name
Specifies the name of the partition. Set the name of the partition in this field.
- Archive
Specifies that the partition's files should be moved into a Hadoop Archive (HAR).
- Touch
Specifies whether you want to read metadata and write it back. This is similar to causing pre/post execute hooks to fire.
- On the General tab, work with the following options:
- Storage Options:
- Serde Handler Class
Specifies the name of a Java class that implements the Hive SerDe interface.
- Stored As
Specifies the type of file in which data is to be stored. The file can be a TEXTFILE, SEQUENCEFILE, RCFILE, or BINARY SEQUENCEFILE.
- Input Format
Lets you specify your own Java class if you want Hive to read from a different file format. The value of this property depends on the Stored As value.
- Output Format
Lets you specify your own Java class if you want Hive to write to a different file format. The value of this property depends on the Stored As value.
- Serde Properties
Specifies SerDe properties to be associated with the storage handler class.
- Other Options:
- Concatenate
Specifies whether multiple small RC or ORC files contained in a table or partition should be merged into larger files.
- Compact
Specifies whether data should be compacted periodically to save space and optimize data access. Select the type of compaction from the drop-down list:
- MAJOR
Takes one or more delta files and the base file for the bucket and rewrites them into a new base file per bucket.
- MINOR
Takes a set of existing delta files and rewrites them to a single delta file per bucket.
- Partition Exchange:
- Destination Table
Specifies the table to which the partition should be moved to. Select a table from the drop-down list or click New
to create one.
- Click the Statistics tab to view the following options:
- Number Of Files
Specifies the number of files the table has.
- Number Of Rows
Specifies the number of rows the table has
- Raw Data Size
Specifies the size of the original dataset.
- Total Size
Specifies the amount of storage the original dataset takes.
Note: The above information is fetched only when reverse engineering from database is done and you have chosen to store statistical information.
- Click Close.
The partition is defined and the Hive Table Partition Editor closes.
For more information, refer to Hive documentation.
Copyright © 2018 erwin, Inc.
All rights reserved.
|
|