Hive function cheat sheet (Tổng hợp hàm sử dụng trong Apache Hive) - Qubole
Tài liệu cheat sheet về các hàm trong Hive, bao gồm danh sách hàm toán học, cách tạo UDF, UDAF, UDTF, và các lệnh meta.
Đang tạo bản xem trước...
Hive Functions Cheat-sheet, by Qubole How to create and use Hive Functions, Listing of Built-In Functions that are supported in Hive Hive Function Meta commands SHOW FUNCTIONS– lists Hive functions and operators DESCRIBE FUNCTION [function name]– displays short description of the function DESCRIBE FUNCTION EXTENDED [function name]– access extended description of the function Types of Hive Functions UDF– is a function that takes one or more columns from a row as argument and returns a single value or object. Eg: concat(col1, col2) UDAF- aggregates column values in multiple rows and returns a single value. Eg: sum(c1) UDTF— takes zero or more inputs and and produces multiple columns or rows of output. Eg: explode() Macros— a function that users other Hive functions. How To Develop UDFs package org.apache.hadoop.hive.contrib.udf.example; import java.util.Date; import java.text.SimpleDateFormat; import org.apache.hadoop.hive.ql.exec.UDF; @Description(name = "YourUDFName", value = "_FUNC_(InputDataType) - using the input datatype X argument, "+ "returns YYY.", extended = "Example:\n" + " > SELECT _FUNC_(InputDataType) FROM tablename;") public class YourUDFName extends UDF{ .. public YourUDFName( InputDataType InputValue ){ ..; } public String evaluate( InputDataType InputValue ){ ..; } } How To Develop UDFs, GenericUDFs, UDAFs, and UDTFs Mathematical Functions Return Type Name (Signature) Description BIGINT DOUBLE BIGINT BIGINT double round(double a) round(double a, int d) floor(double a) ceil(double a), ceiling(double a) rand(), rand(int seed) double double double double double double double string string exp(double a) ln(double a) log10(double a) log2(double a) log(double base, double a) pow(double a, double p), power(double a, double p) sqrt(double a) bin(BIGINT a) hex(BIGINT a) hex(string a) string unhex(string a) string conv(BIGINT num, int from_base, int to_base), conv(STRING num, int from_base, int to_base) abs(double a) pmod(int a, int b) pmod(doub
… Tải file gốc để đọc toàn bộ tài liệu.
- Tên tài liệu
- Hive function cheat sheet (Tổng hợp hàm sử dụng trong Apache Hive) - Qubole
- Nội dung
- Tài liệu này cung cấp một bản cheat sheet về các hàm trong Hive, bao gồm cách sử dụng, các loại hàm và danh sách chi tiết các hàm toán học cùng mô tả chức năng của chúng.
- Mục lục
- Hive Function Meta commands
- Types of Hive Functions
- How To Develop UDFs
- How To Develop UDFs, GenericUDFs, UDAFs, and UDTFs
- Mathematical Functions
- Doc.pages
- 1 trang
- Người đăng
- Giang Le
Câu hỏi thường gặp
Tài liệu này có miễn phí không?
Có. “Hive function cheat sheet (Tổng hợp hàm sử dụng trong Apache Hive) - Qubole” miễn phí — bạn chỉ cần đăng nhập rồi bấm Tải xuống để lấy file gốc.
Tài liệu dài bao nhiêu trang?
Tài liệu gồm 1 trang. Bạn có thể xem trước online trước khi tải.
Tôi có thể xem trước trước khi tải không?
Có. Bạn xem trước tài liệu ngay trên trang này bằng trình đọc online, rồi quyết định tải về.

Bình luận (0)
Chưa có bình luận nào. Hãy là người đầu tiên!