# ObjectTypeColumnMapping

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ObjectTypeColumnMapping/

Object type column mapping.

- **Full name:** `MFiles.ObjectTypeColumnMapping`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-object_type"></a>`object_type` | `int32` | 1 | Object type ID. |
| <a id="f-ordinal"></a>`ordinal` | `int32` | 2 | One-based source field ordinal. |
| <a id="f-source_field"></a>`source_field` | `string` | 3 | Source field name. |
| <a id="f-data_type"></a>`data_type` | `uint32` | 4 | Source field's data type. |
| <a id="f-target_property_def"></a>`target_property_def` | `int32` | 5 | Target property definition. |
| <a id="f-can_insert"></a>`can_insert` | `bool` | 6 | Is the source field part of insertion operations? |
| <a id="f-can_update"></a>`can_update` | `bool` | 7 | Is the source field part of update operations? |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCObjectTypesAdmin.ParseSQLSelectStatement](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/ParseSQLSelectStatement/index.md): Connects to an external database and returns the source table and columns of a SELECT statement, to set up the column mappings of an external object type.

<a id="used-in-fields"></a>

## Used in fields

- [`ValueListAdmin.database_column_mappings`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.ValueListAdmin/index.md#f-database_column_mappings): Column mappings.
- [`ParseSQLSelectStatementResponse.putf8szcolmappings`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectTypesAdmin/ParseSQLSelectStatement/index.md#response): One mapping per column in the SELECT list, with only the source column details set; fill in the target property definitions yourself.
