DROP EXTERNAL TABLE IF EXISTS NATION_EXT; DROP EXTERNAL TABLE IF EXISTS REGION_EXT; DROP EXTERNAL TABLE IF EXISTS PART_EXT; DROP EXTERNAL TABLE IF EXISTS SUPPLIER_EXT; DROP EXTERNAL TABLE IF EXISTS PARTSUPP_EXT; DROP EXTERNAL TABLE IF EXISTS CUSTOMER_EXT; DROP EXTERNAL TABLE IF EXISTS ORDERS_EXT; DROP EXTERNAL TABLE IF EXISTS LINEITEM_EXT; CREATE READABLE EXTERNAL TABLE NATION_EXT (LIKE NATION) LOCATION ('gpfdist://127.0.0.1:8989/1000s/nation.tbl') FORMAT 'TEXT' (DELIMITER '|'); CREATE READABLE EXTERNAL TABLE REGION_EXT (LIKE REGION) LOCATION ('gpfdist://127.0.0.1:8989/1000s/region.tbl') FORMAT 'TEXT' (DELIMITER '|'); CREATE READABLE EXTERNAL TABLE PART_EXT (LIKE PART) LOCATION ('gpfdist://127.0.0.1:8989/1000s/part.tbl') FORMAT 'TEXT' (DELIMITER '|'); CREATE READABLE EXTERNAL TABLE SUPPLIER_EXT (LIKE SUPPLIER) LOCATION ('gpfdist://127.0.0.1:8989/1000s/supplier.tbl') FORMAT 'TEXT' (DELIMITER '|'); CREATE READABLE EXTERNAL TABLE PARTSUPP_EXT (LIKE PARTSUPP) LOCATION ('gpfdist://127.0.0.1:8989/1000s/partsupp.tbl') FORMAT 'TEXT' (DELIMITER '|'); CREATE READABLE EXTERNAL TABLE CUSTOMER_EXT (LIKE CUSTOMER) LOCATION ('gpfdist://127.0.0.1:8989/1000s/customer.tbl') FORMAT 'TEXT' (DELIMITER '|'); CREATE READABLE EXTERNAL TABLE ORDERS_EXT (LIKE ORDERS) LOCATION ('gpfdist://127.0.0.1:8989/1000s/orders.tbl') FORMAT 'TEXT' (DELIMITER '|'); CREATE READABLE EXTERNAL TABLE LINEITEM_EXT (LIKE LINEITEM) LOCATION ('gpfdist://127.0.0.1:8989/1000s/lineitem.tbl') FORMAT 'TEXT' (DELIMITER '|'); INSERT INTO NATION SELECT * FROM NATION_EXT; DROP EXTERNAL TABLE NATION_EXT; INSERT INTO REGION SELECT * FROM REGION_EXT; DROP EXTERNAL TABLE REGION_EXT; INSERT INTO PART SELECT * FROM PART_EXT; DROP EXTERNAL TABLE PART_EXT; INSERT INTO SUPPLIER SELECT * FROM SUPPLIER_EXT; DROP EXTERNAL TABLE SUPPLIER_EXT; INSERT INTO PARTSUPP SELECT * FROM PARTSUPP_EXT; DROP EXTERNAL TABLE PARTSUPP_EXT; INSERT INTO CUSTOMER SELECT * FROM CUSTOMER_EXT; DROP EXTERNAL TABLE CUSTOMER_EXT; INSERT INTO ORDERS SELECT * FROM ORDERS_EXT; DROP EXTERNAL TABLE ORDERS_EXT; INSERT INTO LINEITEM SELECT * FROM LINEITEM_EXT; DROP EXTERNAL TABLE LINEITEM_EXT;