Now that you have copied the sample data files to your S3 bucket, we can actually copy the data into the tables. There are two
copy commands that we will now review, the first one of which will load the dimension. I have used a fixed layout definition for this data file.
copy all_fips_codes from 's3://testing/redshift/FIPS_CountyName.txt' credentials 'aws_access_key_id=<yourkey>;aws_secret_access_key=<yourkey>' fixedwidth '0:5,1:50';
As this is the first
copy command, let's take it a little slow and walk through the command and the options I have supplied:
all_fips_codes: This is the target table
from 'S3 bucket/FIPS_Countyname.txt': This is the S3 bucket location and the file you uploaded
credentials 'aws_access_key_id; ...