File External table Analysis

Source: Internet
Author: User

File External table analysis if you do not want gpfdist as a server, there is also a simple method-file, directly based on the file path. [Gpadmin @ d1 ~] $ Cat nohup. out Serving HTTP on port 8081, directory/data1/cdrdataServing HTTP on port 8082, directory/data2/cdrdata gtlions = # create external table e_file1 (txt text) location (' file://d1:5432/home/gpadmin/nohup.out ') Format 'text' (delimiter 'off'); create external TABLEgtlions = # select * from e_file1; txt --------------------------------------------------- Serving HTTP on port 8081, directory/data1/cdrdata Serving HTTP on port 8082, directory/data2/cdrdata (2 rows) gtlions = # drop external table e_file1; drop external TABLEgtlions = # create external table e_file1 (txt text) location (' file://d1-1:5432/home/gpadmin/nohup.out ',' file://d1-1:5432/home/gpadmin/nohup.out 2 ') format 'text' (delimiter 'off'); create external TABLEgtlions = # select * from e_file1; txt ----------------------------------------------------- Serving HTTP on port 8081, directory/data1/cdrdata Serving HTTP on port 8082, directory/data2/cdrdata Serving HTTP on port 8081, directory/data1/cdrdata Serving HTTP on port 8082, directory/data2/cdrdata (4 rows) gtlions = # create external table e_file1 (txt text) location (' file://d1-1:5432/home/gpadmin/nohup.out ',' file://d1-1:5432/home/gpadmin/nohup.out 2 ',' file://d1-1:5432/home/gpadmin/nohup.out 1 ',' file://d1-1:5432/home/gpadmin/nohup.out 3 ') format 'text' (delimiter 'off'); create external TABLEgtlions = # select * from e_file1; ERROR: cocould not assign a segment database" file://d1-1:5432/home/gpadmin/nohup.out 3 ". there are more external files than primary segment databases on host "d1-1" prompts that the number of files exceeds the limit, which can be queried in the View: gtlions = # select * from pg_max_external_files; hostname | maxfiles ---------- + ---------- d3-1 | 3d4-1 | 3 d1-1 | 3 d1-2 | 3d3-2 | 3d2-2 | 3d2-1 | 3d4-2 | 3 (8 rows) it has been limited to 3, and cannot be found where to modify the limit. There is also a view gp_segment_configuration to view the name of the seg.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.