November 2019
Beginner to intermediate
470 pages
11h 59m
English
To make this chapter a pleasant experience for you, we will compile some sample data that has been taken from the BP energy report, which can be found at http://www.bp.com/en/global/corporate/energy-economics/statistical-review-of-world-energy/downloads.html.
Here is the data structure that will be used:
test=# CREATE TABLE t_oil ( region text, country text, year int, production int, consumption int ); CREATE TABLE
The test data can be downloaded from our website using curl directly:
test=# COPY t_oil FROM PROGRAM ' curl https://www.cybertec-postgresql.com/secret/oil_ext.txt '; COPY 644
Like we did in the previous chapter, we can download the file before importing it. On some operating systems, curl is not ...
Read now
Unlock full access