- Download the product delivery file
- Extract the delivery file and find the data text file
- Open the US Address Fabric™ Data Change Log Create Table script in a text editor and confirm that the table name is set to US_AddressFabric_ChangeLog
- Run the Create Table script
- After the table structure has been created, copy data using the PostgreSQL
Copy
command:
copy us_address_fabric from program 'cmd /c "type <path of data file>"' with (format csv ,delimiter ' ',header true)
The following alternate syntax can be used if the data doesn't load using the command above:
Syntax:copy us_address_fabric from program 'cmd /c "type <path of data file>"' with (format csv ,delimiter e'\t',header true)
<table_name>: Name of table created using Create Table script
<path_to_text_file>: Path to extracted data text file
<text_file_name.txt>: Extracted data text file name, including file extension
delimiter: Defines the text delimiter (in this case, delimiter is tab)
e'/t': Specifies alternate quoting for tab delimiter
Example:copy us_address_fabric from program 'cmd /c "type 'F:\US_Address_Fabric\ us_address_fabric_changelog_san_francisco.txt"' with (format csv ,delimiter ' ',header true)
Alternate command:
copy us_address_fabric from program 'cmd /c "type 'F:\US_Address_Fabric\ us_address_fabric_changelog_san_francisco.txt"' with (format csv ,delimiter e'\t',header true)