Note: The following procedure uses Consumer Spend as an example
in command syntax. All other GeoEnrichment Demographics datasets can be uploaded by
the following same steps and substituting the appropriate dataset name.
- Download the product delivery file.
- Extract the delivery file and find the text data file.
- Create the table structure in the database using the product-specific Create Table script. Be sure to change the table name in the template to the dataset you are loading. If, for example, you are loading the Consumer Spend dataset, the table should be named consumer_spend.
- If a new format (FMT) file needs to be created, follow the steps contained in https://msdn.microsoft.com/en-us/library/ms191516.aspx.
- Issue the following command:
bcp <database_name>.dbo.<table_name> format nul -c -f
<path>\<format_file_name.fmt> -t "|" -S -T
Syntax:
-T: Specifies that the bcp utility connects to SQL Server with a trusted
connection using integrated security. If -T is not specified, the
-U and -P parameters (username and password,
respectively) must be passed in order to log in.
-t "|": Specifies that the format file will be generated using the pipe
character as a delimiter.
Example:
bcp PAD.dbo.consumer_spend format nul -c -f
C:\Consumer_Spend\consumer_spend.fmt -t "|" -S -T
Note: Once the format file has been generated,
\r
needs to be removed from the file in order to load data successfully.