SlideShare a Scribd company logo
1 of 11
Pivotal Greenplum
External Tables
External Tables
 External tables enable accessing external files as if they are regular database tables. They
are often used to move data into and out of a Greenplum database.
 Used with gpfdist, the Greenplum parallel file distribution program, external tables
provide full parallelism by using the resources of all Greenplum segments to load or
unload data.
 You can query external table data directly and in parallel using SQL commands such as
SELECT, JOIN, or SORT EXTERNAL TABLE DATA, and you can create views for external
tables.
 This makes it easy for Greenplum users to load massive amounts of data by just writing
SQL!
CREATE EXTERNAL TABLE
External table to load data
 Login to a machine which has gpfdist installed.
 ssh <host>
 Start gpfdist as a background process
 gpfdist -d <DIRPATH> -p 8080 &
 Login to Greenplum database for creating tables
Continue…
External table to load data
 Create Table in Greenplum database
CREATE TABLE foo
(
bar_id int not null,
bar text,
bar_description text
)
DISTRIBUTED BY (bar_id);
Continue…
External table to load data
 Create an External Table in Greenplum
CREATE EXTERNAL TABLE ext_foo (LIKE foo) LOCATION ('gpfdist://<HOST>:8080/demo/foo.txt')
FORMAT 'TEXT' (DELIMITER AS '|' NULL AS 'null');
Note:
 We can spelled out all of the columns but a shortcut can be used by using “LIKE foo”
 The location indicates it is using gpfdist and the host is <HOST> with port 8080
 In this case, Files are located at <DIR>/demo/foo.txt but gpfdist is serving <DIR> so we
need to only specify the demo subdirectory and then the file name
 You can pick TEXT or CSV format.
 Here pipes (|) used as delimiter and spelled out null for null values
Continue…
External table to load data
 Insert the data in file <DIR>demo/foo.txt.
1|foo|bar
2|blah|blah
3|this|that
 Run query to fetch data from External Table and insert into regular table.
INSERT INTO foo SELECT * FROM ext_foo;
 Check if data exist in regular table
SELECT * FROM foo
CREATE EXTERNAL WEB TABLE
External web table to load data
 Create an External Table in Greenplum
CREATE EXTERNAL WEB TABLE foo_web
(
bar_id int,
bar text,
bar_description text
)
EXECUTE E'/usr/bin/sudo -u gpload /bin/cat /data/dhh_core/foo.txt' ON HOST
FORMAT 'csv' (delimiter ',' null '' escape '"' quote '"')
ENCODING 'UTF8';
Continue…
External web table to load data
 Insert the data in file <DIR>/demo/foo.txt.
1,foo,bar
2,blah,blah
3,this,that
 Run query to fetch data from External Table and insert into regular table.
INSERT INTO foo(bar_id, bar, bar_description)
SELECT bar_id, bar, bar_description FROM foo_web
 Check if data exist in regular table
SELECT * FROM foo
Pivotal Greenplum
Questions

More Related Content

What's hot

scalikejdbc-bigquery
scalikejdbc-bigqueryscalikejdbc-bigquery
scalikejdbc-bigqueryHaruki Okada
 
Consuming open and linked data with open source tools
Consuming open and linked data with open source toolsConsuming open and linked data with open source tools
Consuming open and linked data with open source toolsJoanne Cook
 
Geo CO - RTD Denver
Geo CO - RTD DenverGeo CO - RTD Denver
Geo CO - RTD DenverMike Giddens
 
Inverted page tables basic
Inverted page tables basicInverted page tables basic
Inverted page tables basicSanoj Kumar
 
Index management in depth
Index management in depthIndex management in depth
Index management in depthAndrea Giuliano
 
Active duplicate database from standby
Active duplicate database from standbyActive duplicate database from standby
Active duplicate database from standbyPrakash Ganesan
 
R data-import, data-export
R data-import, data-exportR data-import, data-export
R data-import, data-exportFAO
 
File management in C++
File management in C++File management in C++
File management in C++apoorvaverma33
 
BHL: Big Data, Big Challenges
BHL: Big Data, Big ChallengesBHL: Big Data, Big Challenges
BHL: Big Data, Big ChallengesChris Freeland
 
Import and Export Big Data using R Studio
Import and Export Big Data using R StudioImport and Export Big Data using R Studio
Import and Export Big Data using R StudioRupak Roy
 
file management in c language
file management in c languagefile management in c language
file management in c languagechintan makwana
 
computer notes - Data Structures - 13
computer notes - Data Structures - 13computer notes - Data Structures - 13
computer notes - Data Structures - 13ecomputernotes
 
List to Data (MS Access)
List to Data (MS Access)List to Data (MS Access)
List to Data (MS Access)TonyHine
 
Horizontal-to-Vertical Spectral Ratio Seismic Method
Horizontal-to-Vertical Spectral Ratio Seismic Method Horizontal-to-Vertical Spectral Ratio Seismic Method
Horizontal-to-Vertical Spectral Ratio Seismic Method Ali Osman Öncel
 
Secondary Index Search in InnoDB
Secondary Index Search in InnoDBSecondary Index Search in InnoDB
Secondary Index Search in InnoDBMIJIN AN
 

What's hot (20)

scalikejdbc-bigquery
scalikejdbc-bigqueryscalikejdbc-bigquery
scalikejdbc-bigquery
 
Data export
Data exportData export
Data export
 
Consuming open and linked data with open source tools
Consuming open and linked data with open source toolsConsuming open and linked data with open source tools
Consuming open and linked data with open source tools
 
Geo CO - RTD Denver
Geo CO - RTD DenverGeo CO - RTD Denver
Geo CO - RTD Denver
 
Inverted page tables basic
Inverted page tables basicInverted page tables basic
Inverted page tables basic
 
Index management in depth
Index management in depthIndex management in depth
Index management in depth
 
Active duplicate database from standby
Active duplicate database from standbyActive duplicate database from standby
Active duplicate database from standby
 
Chap13 scr
Chap13 scrChap13 scr
Chap13 scr
 
R data-import, data-export
R data-import, data-exportR data-import, data-export
R data-import, data-export
 
File management in C++
File management in C++File management in C++
File management in C++
 
BHL: Big Data, Big Challenges
BHL: Big Data, Big ChallengesBHL: Big Data, Big Challenges
BHL: Big Data, Big Challenges
 
File Management in C
File Management in CFile Management in C
File Management in C
 
Import and Export Big Data using R Studio
Import and Export Big Data using R StudioImport and Export Big Data using R Studio
Import and Export Big Data using R Studio
 
Apache HBase
Apache HBase  Apache HBase
Apache HBase
 
file management in c language
file management in c languagefile management in c language
file management in c language
 
computer notes - Data Structures - 13
computer notes - Data Structures - 13computer notes - Data Structures - 13
computer notes - Data Structures - 13
 
List to Data (MS Access)
List to Data (MS Access)List to Data (MS Access)
List to Data (MS Access)
 
File_Management_in_C
File_Management_in_CFile_Management_in_C
File_Management_in_C
 
Horizontal-to-Vertical Spectral Ratio Seismic Method
Horizontal-to-Vertical Spectral Ratio Seismic Method Horizontal-to-Vertical Spectral Ratio Seismic Method
Horizontal-to-Vertical Spectral Ratio Seismic Method
 
Secondary Index Search in InnoDB
Secondary Index Search in InnoDBSecondary Index Search in InnoDB
Secondary Index Search in InnoDB
 

Similar to Pivotal greenplum external tables

External Tables - not just loading a csv file
External Tables - not just loading a csv fileExternal Tables - not just loading a csv file
External Tables - not just loading a csv fileKim Berg Hansen
 
Devry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-filesDevry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-filesnoahjamessss
 
Devry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-filesDevry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-filescskvsmi44
 
Accessing external hadoop data sources using pivotal e xtension framework (px...
Accessing external hadoop data sources using pivotal e xtension framework (px...Accessing external hadoop data sources using pivotal e xtension framework (px...
Accessing external hadoop data sources using pivotal e xtension framework (px...Sameer Tiwari
 
#include iostream #include cstring #include vector #i.pdf
 #include iostream #include cstring #include vector #i.pdf #include iostream #include cstring #include vector #i.pdf
#include iostream #include cstring #include vector #i.pdfanandatalapatra
 
num.txt(Save this file under D Drive.Then the path of the file is D.pdf
num.txt(Save this file under D Drive.Then the path of the file is D.pdfnum.txt(Save this file under D Drive.Then the path of the file is D.pdf
num.txt(Save this file under D Drive.Then the path of the file is D.pdfANSAPPARELS
 
data loading and unloading in IBM Netezza by www.etraining.guru
data loading and unloading in IBM Netezza by www.etraining.gurudata loading and unloading in IBM Netezza by www.etraining.guru
data loading and unloading in IBM Netezza by www.etraining.guruRavikumar Nandigam
 
C++17 std::filesystem - Overview
C++17 std::filesystem - OverviewC++17 std::filesystem - Overview
C++17 std::filesystem - OverviewBartlomiej Filipek
 
IN C LANGUAGE- I've been trying to finish this program for the last fe.docx
IN C LANGUAGE- I've been trying to finish this program for the last fe.docxIN C LANGUAGE- I've been trying to finish this program for the last fe.docx
IN C LANGUAGE- I've been trying to finish this program for the last fe.docxGordonpACKellyb
 
Extending Zend Framework
Extending Zend FrameworkExtending Zend Framework
Extending Zend FrameworkPHPBelgium
 
Working with the IFS on System i
Working with the IFS on System iWorking with the IFS on System i
Working with the IFS on System iChuck Walker
 
SAS cheat sheet
SAS cheat sheetSAS cheat sheet
SAS cheat sheetAli Ajouz
 

Similar to Pivotal greenplum external tables (20)

External Tables - not just loading a csv file
External Tables - not just loading a csv fileExternal Tables - not just loading a csv file
External Tables - not just loading a csv file
 
Sas classes in mumbai
Sas classes in mumbaiSas classes in mumbai
Sas classes in mumbai
 
Pig workshop
Pig workshopPig workshop
Pig workshop
 
Devry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-filesDevry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-files
 
Devry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-filesDevry cis-170-c-i lab-7-of-7-sequential-files
Devry cis-170-c-i lab-7-of-7-sequential-files
 
Apache Hive
Apache HiveApache Hive
Apache Hive
 
File_Handling in C.ppt
File_Handling in C.pptFile_Handling in C.ppt
File_Handling in C.ppt
 
File_Handling in C.ppt
File_Handling in C.pptFile_Handling in C.ppt
File_Handling in C.ppt
 
Accessing external hadoop data sources using pivotal e xtension framework (px...
Accessing external hadoop data sources using pivotal e xtension framework (px...Accessing external hadoop data sources using pivotal e xtension framework (px...
Accessing external hadoop data sources using pivotal e xtension framework (px...
 
#include iostream #include cstring #include vector #i.pdf
 #include iostream #include cstring #include vector #i.pdf #include iostream #include cstring #include vector #i.pdf
#include iostream #include cstring #include vector #i.pdf
 
num.txt(Save this file under D Drive.Then the path of the file is D.pdf
num.txt(Save this file under D Drive.Then the path of the file is D.pdfnum.txt(Save this file under D Drive.Then the path of the file is D.pdf
num.txt(Save this file under D Drive.Then the path of the file is D.pdf
 
data loading and unloading in IBM Netezza by www.etraining.guru
data loading and unloading in IBM Netezza by www.etraining.gurudata loading and unloading in IBM Netezza by www.etraining.guru
data loading and unloading in IBM Netezza by www.etraining.guru
 
java programming
java programmingjava programming
java programming
 
Less17 Util
Less17  UtilLess17  Util
Less17 Util
 
C++17 std::filesystem - Overview
C++17 std::filesystem - OverviewC++17 std::filesystem - Overview
C++17 std::filesystem - Overview
 
IN C LANGUAGE- I've been trying to finish this program for the last fe.docx
IN C LANGUAGE- I've been trying to finish this program for the last fe.docxIN C LANGUAGE- I've been trying to finish this program for the last fe.docx
IN C LANGUAGE- I've been trying to finish this program for the last fe.docx
 
Extending Zend Framework
Extending Zend FrameworkExtending Zend Framework
Extending Zend Framework
 
Working with the IFS on System i
Working with the IFS on System iWorking with the IFS on System i
Working with the IFS on System i
 
SAS cheat sheet
SAS cheat sheetSAS cheat sheet
SAS cheat sheet
 
working with files
working with filesworking with files
working with files
 

Recently uploaded

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 

Recently uploaded (20)

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 

Pivotal greenplum external tables

  • 2. External Tables  External tables enable accessing external files as if they are regular database tables. They are often used to move data into and out of a Greenplum database.  Used with gpfdist, the Greenplum parallel file distribution program, external tables provide full parallelism by using the resources of all Greenplum segments to load or unload data.  You can query external table data directly and in parallel using SQL commands such as SELECT, JOIN, or SORT EXTERNAL TABLE DATA, and you can create views for external tables.  This makes it easy for Greenplum users to load massive amounts of data by just writing SQL!
  • 4. External table to load data  Login to a machine which has gpfdist installed.  ssh <host>  Start gpfdist as a background process  gpfdist -d <DIRPATH> -p 8080 &  Login to Greenplum database for creating tables Continue…
  • 5. External table to load data  Create Table in Greenplum database CREATE TABLE foo ( bar_id int not null, bar text, bar_description text ) DISTRIBUTED BY (bar_id); Continue…
  • 6. External table to load data  Create an External Table in Greenplum CREATE EXTERNAL TABLE ext_foo (LIKE foo) LOCATION ('gpfdist://<HOST>:8080/demo/foo.txt') FORMAT 'TEXT' (DELIMITER AS '|' NULL AS 'null'); Note:  We can spelled out all of the columns but a shortcut can be used by using “LIKE foo”  The location indicates it is using gpfdist and the host is <HOST> with port 8080  In this case, Files are located at <DIR>/demo/foo.txt but gpfdist is serving <DIR> so we need to only specify the demo subdirectory and then the file name  You can pick TEXT or CSV format.  Here pipes (|) used as delimiter and spelled out null for null values Continue…
  • 7. External table to load data  Insert the data in file <DIR>demo/foo.txt. 1|foo|bar 2|blah|blah 3|this|that  Run query to fetch data from External Table and insert into regular table. INSERT INTO foo SELECT * FROM ext_foo;  Check if data exist in regular table SELECT * FROM foo
  • 9. External web table to load data  Create an External Table in Greenplum CREATE EXTERNAL WEB TABLE foo_web ( bar_id int, bar text, bar_description text ) EXECUTE E'/usr/bin/sudo -u gpload /bin/cat /data/dhh_core/foo.txt' ON HOST FORMAT 'csv' (delimiter ',' null '' escape '"' quote '"') ENCODING 'UTF8'; Continue…
  • 10. External web table to load data  Insert the data in file <DIR>/demo/foo.txt. 1,foo,bar 2,blah,blah 3,this,that  Run query to fetch data from External Table and insert into regular table. INSERT INTO foo(bar_id, bar, bar_description) SELECT bar_id, bar, bar_description FROM foo_web  Check if data exist in regular table SELECT * FROM foo