DataFormatConversionConfigurationProperty Struct
Specifies that you want Kinesis Data Firehose to convert data from the JSON format to the Parquet or ORC format before writing it to Amazon S3.
Kinesis Data Firehose uses the serializer and deserializer that you specify, in addition to the column information from the AWS Glue table, to deserialize your input data from JSON and then serialize it to the Parquet or ORC format. For more information, see Kinesis Data Firehose Record Format Conversion .
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_kinesisfirehose as kinesisfirehose } from 'aws-cdk-lib';
const dataFormatConversionConfigurationProperty: kinesisfirehose.CfnDeliveryStream.DataFormatConversionConfigurationProperty = {
enabled: false,
inputFormatConfiguration: {
deserializer: {
hiveJsonSerDe: {
timestampFormats: ['timestampFormats'],
},
openXJsonSerDe: {
caseInsensitive: false,
columnToJsonKeyMappings: {
columnToJsonKeyMappingsKey: 'columnToJsonKeyMappings',
},
convertDotsInJsonKeysToUnderscores: false,
},
},
},
outputFormatConfiguration: {
serializer: {
orcSerDe: {
blockSizeBytes: 123,
bloomFilterColumns: ['bloomFilterColumns'],
bloomFilterFalsePositiveProbability: 123,
compression: 'compression',
dictionaryKeyThreshold: 123,
enablePadding: false,
formatVersion: 'formatVersion',
paddingTolerance: 123,
rowIndexStride: 123,
stripeSizeBytes: 123,
},
parquetSerDe: {
blockSizeBytes: 123,
compression: 'compression',
enableDictionaryCompression: false,
maxPaddingBytes: 123,
pageSizeBytes: 123,
writerVersion: 'writerVersion',
},
},
},
schemaConfiguration: {
catalogId: 'catalogId',
databaseName: 'databaseName',
region: 'region',
roleArn: 'roleArn',
tableName: 'tableName',
versionId: 'versionId',
},
};
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_kinesisfirehose as kinesisfirehose
data_format_conversion_configuration_property = kinesisfirehose.CfnDeliveryStream.DataFormatConversionConfigurationProperty(
enabled=False,
input_format_configuration=kinesisfirehose.CfnDeliveryStream.InputFormatConfigurationProperty(
deserializer=kinesisfirehose.CfnDeliveryStream.DeserializerProperty(
hive_json_ser_de=kinesisfirehose.CfnDeliveryStream.HiveJsonSerDeProperty(
timestamp_formats=["timestampFormats"]
),
open_x_json_ser_de=kinesisfirehose.CfnDeliveryStream.OpenXJsonSerDeProperty(
case_insensitive=False,
column_to_json_key_mappings={
"column_to_json_key_mappings_key": "columnToJsonKeyMappings"
},
convert_dots_in_json_keys_to_underscores=False
)
)
),
output_format_configuration=kinesisfirehose.CfnDeliveryStream.OutputFormatConfigurationProperty(
serializer=kinesisfirehose.CfnDeliveryStream.SerializerProperty(
orc_ser_de=kinesisfirehose.CfnDeliveryStream.OrcSerDeProperty(
block_size_bytes=123,
bloom_filter_columns=["bloomFilterColumns"],
bloom_filter_false_positive_probability=123,
compression="compression",
dictionary_key_threshold=123,
enable_padding=False,
format_version="formatVersion",
padding_tolerance=123,
row_index_stride=123,
stripe_size_bytes=123
),
parquet_ser_de=kinesisfirehose.CfnDeliveryStream.ParquetSerDeProperty(
block_size_bytes=123,
compression="compression",
enable_dictionary_compression=False,
max_padding_bytes=123,
page_size_bytes=123,
writer_version="writerVersion"
)
)
),
schema_configuration=kinesisfirehose.CfnDeliveryStream.SchemaConfigurationProperty(
catalog_id="catalogId",
database_name="databaseName",
region="region",
role_arn="roleArn",
table_name="tableName",
version_id="versionId"
)
)
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.kinesisfirehose.*;
DataFormatConversionConfigurationProperty dataFormatConversionConfigurationProperty = DataFormatConversionConfigurationProperty.builder()
.enabled(false)
.inputFormatConfiguration(InputFormatConfigurationProperty.builder()
.deserializer(DeserializerProperty.builder()
.hiveJsonSerDe(HiveJsonSerDeProperty.builder()
.timestampFormats(List.of("timestampFormats"))
.build())
.openXJsonSerDe(OpenXJsonSerDeProperty.builder()
.caseInsensitive(false)
.columnToJsonKeyMappings(Map.of(
"columnToJsonKeyMappingsKey", "columnToJsonKeyMappings"))
.convertDotsInJsonKeysToUnderscores(false)
.build())
.build())
.build())
.outputFormatConfiguration(OutputFormatConfigurationProperty.builder()
.serializer(SerializerProperty.builder()
.orcSerDe(OrcSerDeProperty.builder()
.blockSizeBytes(123)
.bloomFilterColumns(List.of("bloomFilterColumns"))
.bloomFilterFalsePositiveProbability(123)
.compression("compression")
.dictionaryKeyThreshold(123)
.enablePadding(false)
.formatVersion("formatVersion")
.paddingTolerance(123)
.rowIndexStride(123)
.stripeSizeBytes(123)
.build())
.parquetSerDe(ParquetSerDeProperty.builder()
.blockSizeBytes(123)
.compression("compression")
.enableDictionaryCompression(false)
.maxPaddingBytes(123)
.pageSizeBytes(123)
.writerVersion("writerVersion")
.build())
.build())
.build())
.schemaConfiguration(SchemaConfigurationProperty.builder()
.catalogId("catalogId")
.databaseName("databaseName")
.region("region")
.roleArn("roleArn")
.tableName("tableName")
.versionId("versionId")
.build())
.build();
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.KinesisFirehose;
var dataFormatConversionConfigurationProperty = new DataFormatConversionConfigurationProperty {
Enabled = false,
InputFormatConfiguration = new InputFormatConfigurationProperty {
Deserializer = new DeserializerProperty {
HiveJsonSerDe = new HiveJsonSerDeProperty {
TimestampFormats = new [] { "timestampFormats" }
},
OpenXJsonSerDe = new OpenXJsonSerDeProperty {
CaseInsensitive = false,
ColumnToJsonKeyMappings = new Dictionary<string, string> {
{ "columnToJsonKeyMappingsKey", "columnToJsonKeyMappings" }
},
ConvertDotsInJsonKeysToUnderscores = false
}
}
},
OutputFormatConfiguration = new OutputFormatConfigurationProperty {
Serializer = new SerializerProperty {
OrcSerDe = new OrcSerDeProperty {
BlockSizeBytes = 123,
BloomFilterColumns = new [] { "bloomFilterColumns" },
BloomFilterFalsePositiveProbability = 123,
Compression = "compression",
DictionaryKeyThreshold = 123,
EnablePadding = false,
FormatVersion = "formatVersion",
PaddingTolerance = 123,
RowIndexStride = 123,
StripeSizeBytes = 123
},
ParquetSerDe = new ParquetSerDeProperty {
BlockSizeBytes = 123,
Compression = "compression",
EnableDictionaryCompression = false,
MaxPaddingBytes = 123,
PageSizeBytes = 123,
WriterVersion = "writerVersion"
}
}
},
SchemaConfiguration = new SchemaConfigurationProperty {
CatalogId = "catalogId",
DatabaseName = "databaseName",
Region = "region",
RoleArn = "roleArn",
TableName = "tableName",
VersionId = "versionId"
}
};
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"
dataFormatConversionConfigurationProperty := &DataFormatConversionConfigurationProperty{
Enabled: jsii.Boolean(false),
InputFormatConfiguration: &InputFormatConfigurationProperty{
Deserializer: &DeserializerProperty{
HiveJsonSerDe: &HiveJsonSerDeProperty{
TimestampFormats: []*string{
jsii.String("timestampFormats"),
},
},
OpenXJsonSerDe: &OpenXJsonSerDeProperty{
CaseInsensitive: jsii.Boolean(false),
ColumnToJsonKeyMappings: map[string]*string{
"columnToJsonKeyMappingsKey": jsii.String("columnToJsonKeyMappings"),
},
ConvertDotsInJsonKeysToUnderscores: jsii.Boolean(false),
},
},
},
OutputFormatConfiguration: &OutputFormatConfigurationProperty{
Serializer: &SerializerProperty{
OrcSerDe: &OrcSerDeProperty{
BlockSizeBytes: jsii.Number(123),
BloomFilterColumns: []*string{
jsii.String("bloomFilterColumns"),
},
BloomFilterFalsePositiveProbability: jsii.Number(123),
Compression: jsii.String("compression"),
DictionaryKeyThreshold: jsii.Number(123),
EnablePadding: jsii.Boolean(false),
FormatVersion: jsii.String("formatVersion"),
PaddingTolerance: jsii.Number(123),
RowIndexStride: jsii.Number(123),
StripeSizeBytes: jsii.Number(123),
},
ParquetSerDe: &ParquetSerDeProperty{
BlockSizeBytes: jsii.Number(123),
Compression: jsii.String("compression"),
EnableDictionaryCompression: jsii.Boolean(false),
MaxPaddingBytes: jsii.Number(123),
PageSizeBytes: jsii.Number(123),
WriterVersion: jsii.String("writerVersion"),
},
},
},
SchemaConfiguration: &SchemaConfigurationProperty{
CatalogId: jsii.String("catalogId"),
DatabaseName: jsii.String("databaseName"),
Region: jsii.String("region"),
RoleArn: jsii.String("roleArn"),
TableName: jsii.String("tableName"),
VersionId: jsii.String("versionId"),
},
}
Properties
enabledoptionalboolean | IResolvableenabledoptionaltyping.Union[bool, IResolvable]enabledoptionalBooleanEnabledoptionalboolEnabledoptionalinterface{} #Defaults to `true` .
Set it to false if you want to disable format conversion while preserving the configuration details.
inputFormatConfigurationoptionalIResolvable | CfnDeliveryStream.input_format_configurationoptionaltyping.Union[IResolvable, InputFormatConfigurationProperty]inputFormatConfigurationoptionalIResolvableInputFormatConfigurationoptionalIResolvableInputFormatConfigurationoptionalinterface{} #Specifies the deserializer that you want Firehose to use to convert the format of your data from JSON.
This parameter is required if Enabled is set to true.
outputFormatConfigurationoptionalIResolvable | CfnDeliveryStream.output_format_configurationoptionaltyping.Union[IResolvable, OutputFormatConfigurationProperty]outputFormatConfigurationoptionalIResolvableOutputFormatConfigurationoptionalIResolvableOutputFormatConfigurationoptionalinterface{} #Specifies the serializer that you want Firehose to use to convert the format of your data to the Parquet or ORC format.
This parameter is required if Enabled is set to true.
schemaConfigurationoptionalIResolvable | CfnDeliveryStream.schema_configurationoptionaltyping.Union[IResolvable, SchemaConfigurationProperty]schemaConfigurationoptionalIResolvableSchemaConfigurationoptionalIResolvableSchemaConfigurationoptionalinterface{} #Specifies the AWS Glue Data Catalog table that contains the column information.
This parameter is required if Enabled is set to true.