Problems and Solutions in the use of Apache Hawq-
\ df view the list of functions
\ df+ view custom functions
\ dc View conversion
\ dc+
\ l View the list of databases
\ d table view table information
\ d + table view table details
Select * from information_schema.schemata;HAWQ null value problem:
When HAWQ imports data, null values must be represented by "\ N" by default
When 2.hawq load imports csv data, the data file is 200g, a gpfdist node is enabled, and it takes 1 hour and 40 minutes to report an error.
The reason may be insufficient memory.
Drop table T1: create table T1 (id int, mac varchar (20), year int) with (appendonly=true,orientation=parquet,compresstype=snappy, bucketnum=18) distributed by (mac) PARTITION BY RANGE (year) (START (2001) INCLUSIVE END (2003) EXCLUSIVE EVERY (1), DEFAULT PARTITION extra); ```
ALTER TABLE t1 SPLIT DEFAULT PARTITION
START (2003) INCLUSIVE
END (2004) EXCLUSIVE
INTO (PARTITION y2003, default partition)
Error report:
NOTICE: exchanged partition "extra" of relation "T1" with relation "pg_temp_689110"
NOTICE: dropped partition "extra" for relation "T1"
ERROR: bucketnum requires a numeric value
Solution: remove the specified bucketnum
Set default_hash_table_bucket_number=9
Drop table t1
Create table T1 (id int, mac varchar (20), year int)
With (appendonly=true,orientation=parquet,compresstype=snappy)
Distributed by (mac)
PARTITION BY RANGE (year)
START (2001) INCLUSIVE END (2003) EXCLUSIVE EVERY (1)
DEFAULT PARTITION extra)
ALTER TABLE t1 SPLIT DEFAULT PARTITION
START (2003) INCLUSIVE
END (2004) EXCLUSIVE
INTO (PARTITION y2003, default partition)
Set default_hash_table_bucket_number=18