Skip to content

Commit

Permalink
try inline config
Browse files Browse the repository at this point in the history
  • Loading branch information
adnahassan committed Jan 10, 2025
1 parent 0c914af commit 8b36c2f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
9 changes: 8 additions & 1 deletion iac/main/resources/raw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,18 @@ RawLayerTestCrawler:
- Path: !Sub 's3://${RawLayerBucket}/txma/'
DatabaseName: !Ref RawGlueDatabase
CrawlerSecurityConfiguration: !Ref GlueSecurityConfig
PartitionKeys:
- Name: year
Type: string
- Name: month
Type: string
- Name: day
Type: string
TableName: txma-poc
RecrawlPolicy:
RecrawlBehavior: CRAWL_EVERYTHING
SchemaChangePolicy:
UpdateBehavior: UPDATE_IN_DATABASE
DeleteBehavior: DELETE_FROM_DATABASE

TxmaCrawlerInvoke:
# checkov:skip=CKV_AWS_116: DLQ not needed as this lambda failing will cause state machine to fail
Expand Down
19 changes: 19 additions & 0 deletions src/handlers/trigger-txma-crawler/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@ export const handler = async (): Promise<unknown> => {
Path: path,
})),
},
Configuration: JSON.stringify({
Version: 1.0,
CrawlerOutput: {
Partitions: {
AddOrUpdateBehavior: 'InheritFromTable',
},
TableLevelConfiguration: [
{
DatabaseName: 'dev-txma-raw',
TableName: 'txma-poc',
Path: 's3://dev-txma-raw/txma/',
},
],
},
}),
TablePrefix: '',
RecrawlPolicy: {
RecrawlBehavior: 'CRAWL_NEW_FOLDERS_ONLY',
},
});
try {
const response = await glueClient.send(updateCrawlerCommand);
Expand Down

0 comments on commit 8b36c2f

Please sign in to comment.