in cdk-codecommit-codepipeline-sfn-athena-glue/src/stacks/stack_glue.ts [13:71]
constructor(scope: Construct, id: string, props: s3BucketProps) {
super(scope, id, props);
const testDatabase = new Database(this, 'testDB', {
databaseName: config.databaseName
});
const empTable = new Table(this, 'empMaster', {
database: testDatabase,
tableName: config.empMaster,
columns: [
{
name: 'emp_id',
type: Schema.INTEGER
},
{
name: 'emp_name',
type: Schema.STRING
},
{
name: 'emp_email',
type: Schema.STRING
},
{
name: 'emp_phone',
type: Schema.char(10)
}
],
bucket: props.s3EmpMaster,
s3Prefix: 'emp',
dataFormat: DataFormat.JSON
});
const empDetailTable = new Table(this, 'empDetails', {
database: testDatabase,
tableName: config.empDetails,
columns: [
{
name: 'emp_id',
type: Schema.INTEGER
},
{
name: 'emp_department',
type: Schema.STRING
},
{
name: 'emp_manager',
type: Schema.STRING
},
],
bucket: props.s3EmpMaster,
s3Prefix: 'empDetails',
dataFormat: DataFormat.JSON
});
this.empTable = empTable;
this.empDetailTable = empDetailTable;
this.gDB = testDatabase;
}