Đầu tiên chúng ta sẽ kết xuất tất cả các công ty và “ID ngoài” tương ứng. Trong PSQL, viết câu lệnh sau: '''> copy (select 'company_'||id as "External ID",company_name as "Name",'True' as "Is a Company" from companies) TO '/tmp/company.csv' with CSV HEADER'''; Lnh SQL này sẽ tạo ra các file CSV sau đây: '''ID bên ngoài, tên là một công ty'''
We will first export all companies and their "External ID". In PSQL, write the following command: