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 boolean Specifiess whether a column header is included in the datasource
columnSeparator string Character used to separate the data columns
propertyMappings PropertyMappings[ ] 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, either: ["Property" (default)

JSON Examples

Example #1

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

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 
        }
    ]
}