DataFormat Type Definition

[This topic is pre-release documentation and is subject to change.]

The DataFormat complex type is used to represent information in a datasource, for example a CSV file uploaded into a blob.

DataFormat properties

Property JSON type Description
HasHeader Bool Specifiess whether a column header is included in the datasource
ColumnSeparator string Character used to separate the data columns
PropertyMappings Dictionary<string,object>[] A description of each column and its matching property (see below)

PropertyMappings properties

Property JSON type Description
ColumnName string Name of the data column
PropertyName string Name of the mapped property
IsEncrypted Bool indicates whether the column is encrypted
MappingPropertyKind string indicates the kind of column to property mapping. can be ["Property" (default if unspecified)

JSON example #1

{ 
    'HasHeader':true, 
    'ColumnSeparator':',', 
    'PropertyMappings': 
    [ 
        { 
            'ColumnName':'f_name', 
            'PropertyName':'FirstName', 
            'IsEncrypted':false,
            'MappingPropertyKind': 'Property' 
        }, 
        { 
            'ColumnName':'l_name', 
            'PropertyName':'LastName', 
            'IsEncrypted':false
        } 
    ] 
}

JSON example #2

{
    'HasHeader':true,
    'ColumnSeparator':',',
    'PropertyMappings':
    [
        {
            'ColumnName':'deviceid',
            'PropertyName':'DeviceId',
            'IsEncrypted':false,
            'MappingPropertyKind': 'ProfileKeyPropertyInRelationship'   
        },
        {
            'ColumnName':'ownerid',
            'PropertyName':'UserId',
            'IsEncrypted':false,
            'MappingPropertyKind': 'RelatedProfileKeyPropertyInRelationship'         
        }
        {
            'ColumnName':'Price',
            'PropertyName':'DevicePrice',
            'IsEncrypted':false       
        }
    ]
}