Slide 58
Slide 58 text
$%,αϯϓϧɿ4(MVF5BCMF
export async function eventGlueTableResource(
stack: cdk.Construct,
global: GlobalProps,
s3Resource: SlsGlueTableResourceInput,
): Promise {
const slsVirtualDataBase = new glue.Database(stack, 'SlsVirtualDatabase', {
databaseName: global.getGlueDatabaseName('slsVirtual_application'),
});
const sessionGlueTable = new glue.Table(stack, 'SessionTable', {
database: slsVirtualDataBase,
tableName: 'session',
columns: [
{
name: 'sessionId',
type: glue.Schema.STRING,
},
{
name: 'email',
type: glue.Schema.STRING,
},
{
name: 'title',
type: glue.Schema.STRING,
},
{
name: 'description',
type: glue.Schema.STRING,
},
{
name: 'organizationName',
type: glue.Schema.STRING,
},
{
name: 'name',
type: glue.Schema.STRING,
},
],
dataFormat: glue.DataFormat.JSON,
bucket: s3Resource.jsonLinesBucket,
s3Prefix: 'session/',
partitionKeys: [
{
name: 'eventId',
type: glue.Schema.STRING,
},
{
name: 'versionId',
type: glue.Schema.STRING,
},
],
});