AWS::KinesisAnalyticsV2::ApplicationReferenceDataSource
Adds a reference data source to an existing SQL-based Kinesis Data Analytics application.
Kinesis Data Analytics reads reference data (that is, an Amazon S3 object) and creates an in-application table within your application. In the request, you provide the source (S3 bucket name and object key name), name of the in-application table to create, and the necessary mapping information that describes how data in an Amazon S3 object maps to columns in the resulting in-application table.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::KinesisAnalyticsV2::ApplicationReferenceDataSource", "Properties" : { "ApplicationName" :
String
, "ReferenceDataSource" :ReferenceDataSource
} }
YAML
Type: AWS::KinesisAnalyticsV2::ApplicationReferenceDataSource Properties: ApplicationName:
String
ReferenceDataSource:ReferenceDataSource
Properties
ApplicationName
-
The name of the application.
Required: Yes
Type: String
Update requires: Replacement
ReferenceDataSource
-
For a SQL-based Kinesis Data Analytics application, describes the reference data source by providing the source information (Amazon S3 bucket name and object key name), the resulting in-application table name that is created, and the necessary schema to map the data elements in the Amazon S3 object to the in-application table.
Required: Yes
Type: ReferenceDataSource
Update requires: No interruption
Return values
Fn::GetAtt
Examples
Create an ApplicationReferenceDataSource resource
JSON
{ "ApplicationReferenceDataSource": { "Type": "AWS::KinesisAnalyticsV2::ApplicationReferenceDataSource", "Properties": { "ApplicationName": { "Ref": "BasicApplication" }, "ReferenceDataSource": { "TableName": "exampleTable", "ReferenceSchema": { "RecordColumns": [ { "Name": "example", "SqlType": "VARCHAR(16)", "Mapping": "$.example" } ], "RecordFormat": { "RecordFormatType": "JSON", "MappingParameters": { "JSONMappingParameters": { "RecordRowPath": "$" } } } }, "S3ReferenceDataSource": { "BucketARN": { "Fn::GetAtt": [ "S3Bucket", "Arn" ] }, "FileKey": "fakeKey" } } } } }
YAML
ApplicationReferenceDataSource: Type: AWS::KinesisAnalyticsV2::ApplicationReferenceDataSource Properties: ApplicationName: Ref: BasicApplication ReferenceDataSource: TableName: exampleTable ReferenceSchema: RecordColumns: - Name: example SqlType: VARCHAR(16) Mapping: "$.example" RecordFormat: RecordFormatType: JSON MappingParameters: JSONMappingParameters: RecordRowPath: "$" S3ReferenceDataSource: BucketARN: Fn::GetAtt: - S3Bucket - Arn FileKey: fakeKey
See also
-
AddApplicationReferenceDataSource in the Amazon Kinesis Data Analytics API Reference