# MetadataExtractionProcessor

The data processor for dynamic partitioning with inline parsing.

Extends: MetadataExtractionProcessor
Implements: IDataProcessor

- Source: [`aws-kinesisfirehose/lib/processors/metadata-extraction-processor.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-kinesisfirehose/lib/processors/metadata-extraction-processor.ts#L48)
- Type last changed: v2.239.0 · 19 Feb 2026

## Example

```ts
declare const bucket: s3.Bucket;
const s3Destination = new firehose.S3Bucket(bucket, {
  dynamicPartitioning: { enabled: true },
  processors: [
    firehose.MetadataExtractionProcessor.jq16({
      customer_id: '.customer_id',
      device: '.type.device',
      year: '.event_timestamp|strftime("%Y")',
    }),
  ],
  dataOutputPrefix: '!{partitionKeyFromQuery:year}/!{partitionKeyFromQuery:device}/!{partitionKeyFromQuery:customer_id}/',
});
new firehose.DeliveryStream(this, 'DeliveryStream', {
  destination: s3Destination,
});
```

## Initializer

```ts
new MetadataExtractionProcessor(options: MetadataExtractionProcessorOptions, keys: string[])
```

## Properties

- `props`: [DataProcessorProps](/cdk/api/v2/docs/aws-cdk-lib.aws_kinesisfirehose.DataProcessorProps.html) — The constructor props of the DataProcessor.

## Methods

- `bind(scope: Construct, options: DataProcessorBindOptions): DataProcessorConfig` — Binds this processor to a destination of a delivery stream.

  Implementers should use this method to grant processor invocation permissions to the provided stream and return the
  necessary configuration to register as a processor.

- `jq16(query: { [key: string]: string }): MetadataExtractionProcessor // chainable` (static) — Creates the inline parsing configuration with JQ 1.6 engine.

  **Parameters**

  - `query` — A map of partition key to jq expression.
