0.1.36 • Published 5 years ago
@cdk-7layer-constructs/kinesis-firehose-transformer v0.1.36
@cdk-7layer-constructs/kinesis-firehose-transformer
Kinesis Firehose Transformer
Install
TypeScript/JavaScript:
npm i @cdk-7layer-constructs/kinesis-firehose-transformer
Python:
pip install cdk-7layer-constructs/kinesis-firehose-transformer
How to use
import { Construct, Stack, StackProps, RemovalPolicy } from '@aws-cdk/core';
import { KinesisFirehoseTransformer } from '@cdk-7layer-constructs/kinesis-firehose-transformer';
import { RetentionDays } from '@aws-cdk/aws-logs'
import { Database, Schema, DataFormat } from '@aws-cdk/aws-glue'
import { Bucket } from '@Aws-cdk/aws-s3'
export class KinesisFirehoseTransformerAppStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const sourceDatabase = new Database(this, 'SourceDatabase', {
databaseName: 'source_database'
})
const targetDatabase = new Database(this, 'TargetDatabase', {
databaseName: 'target_database'
})
const sourceBucket = new Bucket(this, 'SourceBucket')
const targetBukcet = new Bucket(this, 'TargetBucket')
const cols = [
{
name: "created_at",
type: Schema.STRING
},
{
name: "id",
type: Schema.BIG_INT
}
]
new KinesisFirehoseTransformer(this, 'KinesisConverter', {
createEncryptionKey: true,
deliveryStreamName: 'test-delivery',
enableCloudwatchLogging: true,
targetTableConfig: {
columns: cols,
databaseArn: targetDatabase.databaseArn,
tableName: 'targe_table',
s3BucketArn: targetBukcet.bucketArn,
s3prefix: 'processed/'
},
logsConfig: {
logsGroupName: '/aws/kinesisfirehose/test-delivery',
logsRemovalPolicy: RemovalPolicy.DESTROY,
logsRetentionDays: RetentionDays.ONE_WEEK
},
sourceBackupConfig: {
columns: cols,
databaseArn: sourceDatabase.databaseArn,
tableName: 'source_table',
s3BucketArn: sourceBucket.bucketArn,
s3prefix: 'raw/',
dataFormat: DataFormat.JSON
},
useLakeformation: true
})
}
}
API Reference
See API.md.
Example
See more complete examples.
License
0.1.36
5 years ago
0.1.34
5 years ago
0.1.35
5 years ago
0.1.33
5 years ago
0.1.32
5 years ago
0.1.30
5 years ago
0.1.31
5 years ago
0.1.29
5 years ago
0.1.27
5 years ago
0.1.28
5 years ago
0.1.26
5 years ago
0.1.24
5 years ago
0.1.25
5 years ago
0.1.23
5 years ago
0.1.22
5 years ago
0.1.21
5 years ago
0.1.20
5 years ago
0.1.17
5 years ago
0.1.19
5 years ago
0.1.16
5 years ago
0.1.13
5 years ago
0.1.14
5 years ago
0.1.15
5 years ago
0.1.12
5 years ago
0.1.10
5 years ago
0.1.11
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.9
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago