Purpose
This statement is used to manually update the files of an external table. Data in a single file can be automatically updated, but if the data of the external table comes from a list of files, it cannot be automatically updated and must be manually refreshed.
Syntax
ALTER EXTERNAL TABLE table_name
( REFRESH
| alter_table_action_list
| ADD PARTITION ('partition_spec') LOCATION 'path'
| DROP PARTITION LOCATION 'path'
| exclude_alter_table_action)
alter_table_action_list:
alter_table_action [, alter_table_action ...]
exclude_alter_table_action:
alter_partition_option
modify_partition_info
auto_split_range_partition_option
For more information about alter_table_action_list and exclude_alter_table_action, see ALTER TABLE.
Parameters
table_name specifies the name of the external table to refresh.
Examples
obclient> ALTER EXTERNAL TABLE lineitem REFRESH;