Hive function cheat sheet (Tổng hợp hàm sử dụng trong Apache Hive) - Qubole
- Seiten
- 1
- Định dạng
- Dung lượng
- 4.9 MB
- Aufrufe
- 0
- Kommentare
- 0
- Lượt tải
- 0
Vorschau wird generiert...
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.
- Dokumentenname
- Hive function cheat sheet (Tổng hợp hàm sử dụng trong Apache Hive) - Qubole
- Inhalt
- 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.
- Inhaltsverzeichnis
- Hive Function Meta commands
- Types of Hive Functions
- How To Develop UDFs
- How To Develop UDFs, GenericUDFs, UDAFs, and UDTFs
- Mathematical Functions
- Seiten
- 1 Seiten
- Hochgeladen von
- Uni24h
Beschreibung
Trích nội dung tài liệu
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
Häufig gestellte Fragen
Ist dieses Dokument kostenlos?
Ja. „Hive function cheat sheet (Tổng hợp hàm sử dụng trong Apache Hive) - Qubole“ ist kostenlos — melden Sie sich einfach an und klicken Sie auf Herunterladen, um die Originaldatei zu erhalten.
Wie viele Seiten hat dieses Dokument?
Das Dokument hat 1 Seiten. Sie können es vor dem Herunterladen online in der Vorschau ansehen.
Kann ich vor dem Herunterladen eine Vorschau ansehen?
Ja. Sie können sich dieses Dokument direkt auf dieser Seite im Online-Reader ansehen und dann entscheiden, ob Sie es herunterladen möchten.
Hive function cheat sheet (Tổng hợp hàm sử dụng trong Apache Hive) - Qubole
Vorschau wird generiert...
Trích nội dung tài liệu
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
- Dokumentenname
- Hive function cheat sheet (Tổng hợp hàm sử dụng trong Apache Hive) - Qubole
- Inhalt
- 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.
- Inhaltsverzeichnis
- Hive Function Meta commands
- Types of Hive Functions
- How To Develop UDFs
- How To Develop UDFs, GenericUDFs, UDAFs, and UDTFs
- Mathematical Functions
- Seiten
- 1 Seiten
- Hochgeladen von
- Uni24h
Kommentare (0)
Noch keine Kommentare. Seien Sie der Erste!
Ngân hàng đề thi môn: Hệ thống thông tin quản lý
Đề thi môn Cơ sở dữ liệu (kèm Đáp án) - Đại học Sư phạm kỹ thuật
Đề thi và đáp án môn Hệ thống thông tin kế toán
Đề thi và đáp án môn Cấu trúc dữ liệu giải thuật
Đáp án đề thi môn Mạng máy tính - ĐH Công nghệ thông tin (CNTT)
Tổng hợp Đề Toán 5 - Luyện thi vào Lớp 6 - CLB EMath
Bài giảng vật lý đại cương (Chương 3) - Đỗ Ngọc Uấn
Chương 8.Nguyên tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 7.Cơ học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang
Chương 6.Quang học lượng tử - Vật lý đại cương 3 - TS.Nguyễn Thị Trang

Kommentare (0)
Noch keine Kommentare. Seien Sie der Erste!