Skip to content
v2.278.0

DataFormatConversionProps ​

Struct Stable

Props for specifying data format conversion for Firehose.

Example ​

ts
declare const bucket: s3.Bucket;
declare const schemaGlueTable: glue.CfnTable;
const s3Destination = new firehose.S3Bucket(bucket, {
  dataFormatConversion: {
    schemaConfiguration: firehose.SchemaConfiguration.fromCfnTable(schemaGlueTable),
    inputFormat: firehose.InputFormat.OPENX_JSON,
    outputFormat: firehose.OutputFormat.PARQUET,
  }
});
python
# bucket: s3.Bucket
# schema_glue_table: glue.CfnTable

s3_destination = firehose.S3Bucket(bucket,
    data_format_conversion=firehose.DataFormatConversionProps(
        schema_configuration=firehose.SchemaConfiguration.from_cfn_table(schema_glue_table),
        input_format=firehose.InputFormat.OPENX_JSON,
        output_format=firehose.OutputFormat.PARQUET
    )
)
java
Bucket bucket;
CfnTable schemaGlueTable;

S3Bucket s3Destination = S3Bucket.Builder.create(bucket)
        .dataFormatConversion(DataFormatConversionProps.builder()
                .schemaConfiguration(SchemaConfiguration.fromCfnTable(schemaGlueTable))
                .inputFormat(InputFormat.OPENX_JSON)
                .outputFormat(OutputFormat.PARQUET)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Bucket bucket;
CfnTable schemaGlueTable;

var s3Destination = new S3Bucket(bucket, new S3BucketProps {
    DataFormatConversion = new DataFormatConversionProps {
        SchemaConfiguration = SchemaConfiguration.FromCfnTable(schemaGlueTable),
        InputFormat = InputFormat.OPENX_JSON,
        OutputFormat = OutputFormat.PARQUET
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var bucket Bucket
var schemaGlueTable CfnTable

s3Destination := firehose.NewS3Bucket(bucket, &S3BucketProps{
	DataFormatConversion: &DataFormatConversionProps{
		SchemaConfiguration: firehose.SchemaConfiguration_FromCfnTable(schemaGlueTable),
		InputFormat: firehose.InputFormat_OPENX_JSON(),
		OutputFormat: firehose.OutputFormat_PARQUET(),
	},
})

Properties ​

enabledoptionalbooleanenabledoptionalboolenabledoptionalBooleanEnabledoptionalboolEnabledoptional*bool = `true` #
Whether data format conversion is enabled or not.
inputFormatIInputFormatinput_formatIInputFormatinputFormatIInputFormatInputFormatIInputFormatInputFormatIInputFormat required #
The input format to convert from for record format conversion.
outputFormatIOutputFormatoutput_formatIOutputFormatoutputFormatIOutputFormatOutputFormatIOutputFormatOutputFormatIOutputFormat required #
The output format to convert to for record format conversion.
schemaConfigurationSchemaConfigurationschema_configurationSchemaConfigurationschemaConfigurationSchemaConfigurationSchemaConfigurationSchemaConfigurationSchemaConfigurationSchemaConfiguration required #
The schema configuration to use in converting the input format to output format.