# ColumnConfigurationProperty

Provides information about how Amazon Kendra should use the columns of a database in an index.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_kendra as kendra } from 'aws-cdk-lib';
const columnConfigurationProperty: kendra.CfnDataSource.ColumnConfigurationProperty = {
  changeDetectingColumns: ['changeDetectingColumns'],
  documentDataColumnName: 'documentDataColumnName',
  documentIdColumnName: 'documentIdColumnName',

  // the properties below are optional
  documentTitleColumnName: 'documentTitleColumnName',
  fieldMappings: [{
    dataSourceFieldName: 'dataSourceFieldName',
    indexFieldName: 'indexFieldName',

    // the properties below are optional
    dateFieldFormat: 'dateFieldFormat',
  }],
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_kendra as kendra

column_configuration_property = kendra.CfnDataSource.ColumnConfigurationProperty(
    change_detecting_columns=["changeDetectingColumns"],
    document_data_column_name="documentDataColumnName",
    document_id_column_name="documentIdColumnName",

    # the properties below are optional
    document_title_column_name="documentTitleColumnName",
    field_mappings=[kendra.CfnDataSource.DataSourceToIndexFieldMappingProperty(
        data_source_field_name="dataSourceFieldName",
        index_field_name="indexFieldName",

        # the properties below are optional
        date_field_format="dateFieldFormat"
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.kendra.*;

ColumnConfigurationProperty columnConfigurationProperty = ColumnConfigurationProperty.builder()
        .changeDetectingColumns(List.of("changeDetectingColumns"))
        .documentDataColumnName("documentDataColumnName")
        .documentIdColumnName("documentIdColumnName")

        // the properties below are optional
        .documentTitleColumnName("documentTitleColumnName")
        .fieldMappings(List.of(DataSourceToIndexFieldMappingProperty.builder()
                .dataSourceFieldName("dataSourceFieldName")
                .indexFieldName("indexFieldName")

                // the properties below are optional
                .dateFieldFormat("dateFieldFormat")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Kendra;

var columnConfigurationProperty = new ColumnConfigurationProperty {
    ChangeDetectingColumns = new [] { "changeDetectingColumns" },
    DocumentDataColumnName = "documentDataColumnName",
    DocumentIdColumnName = "documentIdColumnName",

    // the properties below are optional
    DocumentTitleColumnName = "documentTitleColumnName",
    FieldMappings = new [] { new DataSourceToIndexFieldMappingProperty {
        DataSourceFieldName = "dataSourceFieldName",
        IndexFieldName = "indexFieldName",

        // the properties below are optional
        DateFieldFormat = "dateFieldFormat"
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

columnConfigurationProperty := &ColumnConfigurationProperty{
	ChangeDetectingColumns: []*string{
		jsii.String("changeDetectingColumns"),
	},
	DocumentDataColumnName: jsii.String("documentDataColumnName"),
	DocumentIdColumnName: jsii.String("documentIdColumnName"),

	// the properties below are optional
	DocumentTitleColumnName: jsii.String("documentTitleColumnName"),
	FieldMappings: []interface{}{
		&DataSourceToIndexFieldMappingProperty{
			DataSourceFieldName: jsii.String("dataSourceFieldName"),
			IndexFieldName: jsii.String("indexFieldName"),

			// the properties below are optional
			DateFieldFormat: jsii.String("dateFieldFormat"),
		},
	},
}
```

## Properties

- `changeDetectingColumns`: string[] (required) — One to five columns that indicate when a document in the database has changed.

- `documentDataColumnName`: string (required) — The column that contains the contents of the document.

- `documentIdColumnName`: string (required) — The column that provides the document's identifier.

- `documentTitleColumnName`: string — The column that contains the title of the document.

- `fieldMappings`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSource.DataSourceToIndexFieldMappingProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kendra.CfnDataSource.DataSourceToIndexFieldMappingProperty.html)[] — An array of objects that map database column names to the corresponding fields in an index.

  You must first create the fields in the index using the [UpdateIndex](https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateIndex.html) operation.
