0.1.36 • Published 4 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
4 years ago
0.1.34
4 years ago
0.1.35
4 years ago
0.1.33
4 years ago
0.1.32
4 years ago
0.1.30
4 years ago
0.1.31
4 years ago
0.1.29
4 years ago
0.1.27
4 years ago
0.1.28
4 years ago
0.1.26
4 years ago
0.1.24
4 years ago
0.1.25
4 years ago
0.1.23
4 years ago
0.1.22
4 years ago
0.1.21
4 years ago
0.1.20
4 years ago
0.1.17
4 years ago
0.1.19
4 years ago
0.1.16
4 years ago
0.1.13
4 years ago
0.1.14
4 years ago
0.1.15
4 years ago
0.1.12
4 years ago
0.1.10
4 years ago
0.1.11
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.9
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago