UploadSpecificationClass

Contains the location data upload specification for a data upload job.

Public Class UploadSpecification Inherits System.Object
    Member of [Namespace]
[C#]
public class UploadSpecification : System.Object
    Member of [Namespace]

Public Fields

public property DataSourceName A string representing the name of the data source (DataSource.Name property) that the points of interest data is being uploaded to. System.String
public property EntityTypeName A string representing the name of the entity type (EntityType.Name property) of the data that is being uploaded. System.String
public property Environment Indicates what environment should be used for the data upload. The default value is Staging environment. [Namespace].LocationDataEnvironment
public property MaximumGeocodingLevel Indicates the maximum geocoding level to be used for the points of interest data geocoding. The default geocoding level is set to street name (and number). GeocodingLevel
public property RejectAmbiguousGeocodes Indicates whether the ambiguous addresses should be skipped or assigned the latitude/longitude of the first address that matched the input record. System.Boolean

Example


[Visual Basic]

'This example assumes that the customer data service namespace 
'has been imported 

'Create an instance of the customer data service proxy.
Dim custDataService As CustomerDataService = New CustomerDataService
'Assign your credentials.
custDataService.Credentials = _
        New NetworkCredential(myUserName, mySecurePassword, myDomainName)

'Set PreAuthenticate to True
custDataService.PreAuthenticate = True

Try
    'Define an upload specification object
    'and assign all required fields.
    Dim uploadSpec As UploadSpecification = New UploadSpecification
    uploadSpec.DataSourceName = myDataSourceName
    uploadSpec.EntityTypeName = myEntityTypeName
    uploadSpec.Environment = LocationDataEnvironment.Staging
    uploadSpec.MaximumGeocodingLevel = GeocodingLevel.City
    uploadSpec.RejectAmbiguousGeocodes = False
    'Start an upload job and obtain the job ID.
    Dim jobID As String = custDataService.StartUpload(uploadSpec)
Catch e As Exception
    Dim message As String = e.Message
    'Do your exception handling here.
End Try



[C#]

   //This example assumes that the customer data service namespace 
   //has been imported 

   //Create an instance of the customer data service proxy.
   CustomerDataService cds = new CustomerDataService();
   //Assign your credentials.
   cds.Credentials = new System.Net.NetworkCredential(myUserName, 
           mySecurePassword, myDomainName);

   //Set PreAuthenticate to true
   cds.PreAuthenticate = true;

   try
   {
    //Define an upload specification object
    //and assign all required fiecds.
    UploadSpecification uploadspec = new UploadSpecification();
    uploadspec.DataSourceName = myDataSourceName;
    uploadspec.EntityTypeName = myEntityTypeName;
    uploadspec.Environment = LocationDataEnvironment.Staging;
    uploadspec.MaximumGeocodingLevel = GeocodingLevel.City;
    uploadspec.RejectAmbiguousGeocodes = false;
    //Start an upload job and obtain the job ID.
    string jobID = cds.StartUpload(uploadspec);
   }
   catch(Exception ex)
   {
    string message = ex.Message;
    //Do your exception handling here.
   }

   

See Also

CustomerDataService Class | CustomerDataService.StartUpload Method