| 1. |
How Do I Load A Big Csv File Into A Partitioned Table? |
|
Answer» To load a DATA file into a partitioned table, when the data file includes fields like YEAR, month, and so on that correspond to the PARTITION key columns, use a two-stage process. First, use the LOAD DATA or CREATE EXTERNAL TABLE statement to BRING the data into an unpartitioned text table. Then use an INSERT ... SELECT statement to copy the data from the unpartitioned table to a partitioned one. Include a PARTITION clause in the INSERTstatement to specify the partition key columns. To load a data file into a partitioned table, when the data file includes fields like year, month, and so on that correspond to the partition key columns, use a two-stage process. First, use the LOAD DATA or CREATE EXTERNAL TABLE statement to bring the data into an unpartitioned text table. Then use an INSERT ... SELECT statement to copy the data from the unpartitioned table to a partitioned one. Include a PARTITION clause in the INSERTstatement to specify the partition key columns. |
|