@mapbox/cloudfriend 9.2.0 → 9.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +8 -0
- package/.idea/cloudfriend.iml +9 -0
- package/.idea/codeStyles/Project.xml +7 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.nyc_output/6686e513-03b6-415d-9b8b-0fcde7a4e430.json +1 -0
- package/.nyc_output/f58a557c-a1c0-4dcc-83c5-bbca4d01baf9.json +1 -0
- package/.nyc_output/processinfo/6686e513-03b6-415d-9b8b-0fcde7a4e430.json +1 -0
- package/.nyc_output/processinfo/f58a557c-a1c0-4dcc-83c5-bbca4d01baf9.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/cfniceberg_createtable.yaml +71 -0
- package/changelog.md +8 -0
- package/coverage/clover.xml +630 -0
- package/coverage/coverage-final.json +33 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/cloudfriend/bin/build-template.js.html +130 -0
- package/coverage/lcov-report/cloudfriend/bin/index.html +131 -0
- package/coverage/lcov-report/cloudfriend/bin/validate-template.js.html +142 -0
- package/coverage/lcov-report/cloudfriend/index.html +116 -0
- package/coverage/lcov-report/cloudfriend/index.js.html +307 -0
- package/coverage/lcov-report/cloudfriend/lib/build.js.html +217 -0
- package/coverage/lcov-report/cloudfriend/lib/conditions.js.html +430 -0
- package/coverage/lcov-report/cloudfriend/lib/index.html +206 -0
- package/coverage/lcov-report/cloudfriend/lib/intrinsic.js.html +979 -0
- package/coverage/lcov-report/cloudfriend/lib/merge.js.html +478 -0
- package/coverage/lcov-report/cloudfriend/lib/pseudo.js.html +370 -0
- package/coverage/lcov-report/cloudfriend/lib/rules.js.html +349 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/cross-account-role.js.html +244 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/event-lambda.js.html +367 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-database.js.html +286 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-iceberg-table.js.html +646 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-json-table.js.html +235 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-orc-table.js.html +226 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-parquet-table.js.html +268 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-presto-view.js.html +358 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-spark-view.js.html +241 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/glue-table.js.html +481 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/hookshot.js.html +1504 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/index.html +431 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/index.js.html +157 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/kinesis-firehose-base.js.html +418 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/lambda.js.html +832 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/log-subscription-lambda.js.html +310 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/queue-lambda.js.html +364 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/queue.js.html +619 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/role.js.html +382 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/s3-kinesis-firehose.js.html +568 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/scheduled-lambda.js.html +490 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/service-role.js.html +307 -0
- package/coverage/lcov-report/cloudfriend/lib/shortcuts/stream-lambda.js.html +493 -0
- package/coverage/lcov-report/cloudfriend/lib/validate.js.html +154 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +161 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov.info +1319 -0
- package/jest.config.js +14 -0
- package/lib/shortcuts/api.md +37 -0
- package/lib/shortcuts/glue-iceberg-table.js +187 -0
- package/lib/shortcuts/index.js +1 -0
- package/package.json +15 -13
- package/readme.md +1 -1
- package/requirements.dev.txt +2 -2
- package/test/bin.test.js +18 -14
- package/test/fixtures/shortcuts/cross-account-role-defaults.json +1 -1
- package/test/fixtures/shortcuts/cross-account-role-no-defaults.json +1 -1
- package/test/fixtures/shortcuts/event-lambda-defaults.json +1 -1
- package/test/fixtures/shortcuts/event-lambda-full.json +1 -1
- package/test/fixtures/shortcuts/firehose-defaults.json +1 -1
- package/test/fixtures/shortcuts/firehose-with-stream.json +1 -1
- package/test/fixtures/shortcuts/glue-database-defaults.json +1 -1
- package/test/fixtures/shortcuts/glue-database-no-defaults.json +1 -1
- package/test/fixtures/shortcuts/glue-iceberg-table-defaults.json +41 -0
- package/test/fixtures/shortcuts/glue-iceberg-table-no-defaults.json +39 -0
- package/test/fixtures/shortcuts/glue-iceberg-table-with-all-optimizers.json +101 -0
- package/test/fixtures/shortcuts/glue-iceberg-table-with-both-optimizers.json +80 -0
- package/test/fixtures/shortcuts/glue-iceberg-table-with-compaction-custom.json +68 -0
- package/test/fixtures/shortcuts/glue-iceberg-table-with-compaction-defaults.json +57 -0
- package/test/fixtures/shortcuts/glue-iceberg-table-with-optimizer-custom.json +75 -0
- package/test/fixtures/shortcuts/glue-iceberg-table-with-optimizer-defaults.json +64 -0
- package/test/fixtures/shortcuts/glue-iceberg-table-with-orphan-deletion-custom.json +74 -0
- package/test/fixtures/shortcuts/glue-iceberg-table-with-orphan-deletion-defaults.json +62 -0
- package/test/fixtures/shortcuts/glue-json-table-defaults.json +1 -1
- package/test/fixtures/shortcuts/glue-json-table-no-defaults.json +1 -1
- package/test/fixtures/shortcuts/glue-orc-table-defaults.json +1 -1
- package/test/fixtures/shortcuts/glue-orc-table-no-defaults.json +1 -1
- package/test/fixtures/shortcuts/glue-parquet-table-defaults.json +1 -1
- package/test/fixtures/shortcuts/glue-parquet-table-no-defaults.json +1 -1
- package/test/fixtures/shortcuts/glue-table-defaults.json +1 -1
- package/test/fixtures/shortcuts/glue-table-no-defaults.json +1 -1
- package/test/fixtures/shortcuts/glue-view-defaults.json +1 -1
- package/test/fixtures/shortcuts/glue-view-no-defaults.json +1 -1
- package/test/fixtures/shortcuts/hookshot-github-secret-ref.json +1 -1
- package/test/fixtures/shortcuts/hookshot-github-secret-string.json +1 -1
- package/test/fixtures/shortcuts/hookshot-github.json +1 -1
- package/test/fixtures/shortcuts/hookshot-passthrough-access-log-format.json +1 -1
- package/test/fixtures/shortcuts/hookshot-passthrough-alarms.json +1 -1
- package/test/fixtures/shortcuts/hookshot-passthrough-enhanced-logging.json +1 -1
- package/test/fixtures/shortcuts/hookshot-passthrough-full-blown-logging.json +1 -1
- package/test/fixtures/shortcuts/hookshot-passthrough-logging.json +1 -1
- package/test/fixtures/shortcuts/hookshot-passthrough.json +1 -1
- package/test/fixtures/shortcuts/lambda-defaults.json +1 -1
- package/test/fixtures/shortcuts/lambda-docker.json +1 -1
- package/test/fixtures/shortcuts/lambda-full.json +1 -1
- package/test/fixtures/shortcuts/lambda-provided-role.json +1 -1
- package/test/fixtures/shortcuts/lambda-zipfile.json +1 -1
- package/test/fixtures/shortcuts/log-subscription-lambda-defaults.json +1 -1
- package/test/fixtures/shortcuts/log-subscription-lambda-no-defaults.json +1 -1
- package/test/fixtures/shortcuts/queue-defaults.json +1 -1
- package/test/fixtures/shortcuts/queue-external-topic-ref.json +1 -1
- package/test/fixtures/shortcuts/queue-external-topic.json +1 -1
- package/test/fixtures/shortcuts/queue-fifo-queuename.json +1 -1
- package/test/fixtures/shortcuts/queue-fifo.json +1 -1
- package/test/fixtures/shortcuts/queue-full.json +1 -1
- package/test/fixtures/shortcuts/queue-lambda-zero.json +1 -1
- package/test/fixtures/shortcuts/queue-lambda.json +1 -1
- package/test/fixtures/shortcuts/role-defaults.json +1 -1
- package/test/fixtures/shortcuts/role-no-defaults.json +1 -1
- package/test/fixtures/shortcuts/scheduled-lambda-defaults.json +1 -1
- package/test/fixtures/shortcuts/scheduled-lambda-full.json +1 -1
- package/test/fixtures/shortcuts/service-role-defaults.json +1 -1
- package/test/fixtures/shortcuts/service-role-no-defaults.json +1 -1
- package/test/fixtures/shortcuts/service-role-no-url-suffix.json +1 -1
- package/test/fixtures/shortcuts/service-role-url-suffix-with-replacement.json +1 -1
- package/test/fixtures/shortcuts/service-role-url-suffix.json +1 -1
- package/test/fixtures/shortcuts/stream-lambda-defaults.json +1 -1
- package/test/fixtures/shortcuts/stream-lambda-no-defaults.json +1 -1
- package/test/index.test.js +383 -235
- package/test/shortcuts.test.js +1523 -1483
- package/.nyc_output/2b544c0b-2830-4ad0-97cd-8e661710b0bb.json +0 -1
- package/.nyc_output/65e58b48-bf1c-412d-8dd4-d7b564b12d76.json +0 -1
- package/.nyc_output/processinfo/2b544c0b-2830-4ad0-97cd-8e661710b0bb.json +0 -1
- package/.nyc_output/processinfo/65e58b48-bf1c-412d-8dd4-d7b564b12d76.json +0 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AWSTemplateFormatVersion": "2010-09-09",
|
|
3
|
+
"Metadata": {},
|
|
4
|
+
"Parameters": {},
|
|
5
|
+
"Rules": {},
|
|
6
|
+
"Mappings": {},
|
|
7
|
+
"Conditions": {},
|
|
8
|
+
"Resources": {
|
|
9
|
+
"MyTable": {
|
|
10
|
+
"Type": "AWS::Glue::Table",
|
|
11
|
+
"Properties": {
|
|
12
|
+
"CatalogId": {
|
|
13
|
+
"Ref": "AWS::AccountId"
|
|
14
|
+
},
|
|
15
|
+
"DatabaseName": "my_database",
|
|
16
|
+
"Name": "my_table",
|
|
17
|
+
"OpenTableFormatInput": {
|
|
18
|
+
"IcebergInput": {
|
|
19
|
+
"MetadataOperation": "CREATE",
|
|
20
|
+
"Version": "2",
|
|
21
|
+
"IcebergTableInput": {
|
|
22
|
+
"Location": "s3://fake/location",
|
|
23
|
+
"Schema": {
|
|
24
|
+
"Type": "struct",
|
|
25
|
+
"Fields": [
|
|
26
|
+
{
|
|
27
|
+
"Name": "column",
|
|
28
|
+
"Type": "string",
|
|
29
|
+
"Id": 1,
|
|
30
|
+
"Required": true
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"MyTableRetentionOptimizer": {
|
|
40
|
+
"Type": "AWS::Glue::TableOptimizer",
|
|
41
|
+
"DependsOn": "MyTable",
|
|
42
|
+
"Properties": {
|
|
43
|
+
"CatalogId": {
|
|
44
|
+
"Ref": "AWS::AccountId"
|
|
45
|
+
},
|
|
46
|
+
"DatabaseName": "my_database",
|
|
47
|
+
"TableName": "my_table",
|
|
48
|
+
"Type": "retention",
|
|
49
|
+
"TableOptimizerConfiguration": {
|
|
50
|
+
"RoleArn": "arn:aws:iam::123456789012:role/RetentionRole",
|
|
51
|
+
"Enabled": true,
|
|
52
|
+
"RetentionConfiguration": {
|
|
53
|
+
"IcebergConfiguration": {
|
|
54
|
+
"SnapshotRetentionPeriodInDays": 5,
|
|
55
|
+
"NumberOfSnapshotsToRetain": 1,
|
|
56
|
+
"CleanExpiredFiles": true
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"MyTableCompactionOptimizer": {
|
|
63
|
+
"Type": "AWS::Glue::TableOptimizer",
|
|
64
|
+
"DependsOn": "MyTable",
|
|
65
|
+
"Properties": {
|
|
66
|
+
"CatalogId": {
|
|
67
|
+
"Ref": "AWS::AccountId"
|
|
68
|
+
},
|
|
69
|
+
"DatabaseName": "my_database",
|
|
70
|
+
"TableName": "my_table",
|
|
71
|
+
"Type": "compaction",
|
|
72
|
+
"TableOptimizerConfiguration": {
|
|
73
|
+
"RoleArn": "arn:aws:iam::123456789012:role/CompactionRole",
|
|
74
|
+
"Enabled": true
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"Outputs": {}
|
|
80
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AWSTemplateFormatVersion": "2010-09-09",
|
|
3
|
+
"Metadata": {},
|
|
4
|
+
"Parameters": {},
|
|
5
|
+
"Rules": {},
|
|
6
|
+
"Mappings": {},
|
|
7
|
+
"Conditions": {},
|
|
8
|
+
"Resources": {
|
|
9
|
+
"CompactionRole": {
|
|
10
|
+
"Type": "AWS::IAM::Role",
|
|
11
|
+
"Properties": {
|
|
12
|
+
"AssumeRolePolicyDocument": {}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"MyTable": {
|
|
16
|
+
"Type": "AWS::Glue::Table",
|
|
17
|
+
"Properties": {
|
|
18
|
+
"CatalogId": {
|
|
19
|
+
"Ref": "AWS::AccountId"
|
|
20
|
+
},
|
|
21
|
+
"DatabaseName": "my_database",
|
|
22
|
+
"Name": "my_table",
|
|
23
|
+
"OpenTableFormatInput": {
|
|
24
|
+
"IcebergInput": {
|
|
25
|
+
"MetadataOperation": "CREATE",
|
|
26
|
+
"Version": "2",
|
|
27
|
+
"IcebergTableInput": {
|
|
28
|
+
"Location": "s3://fake/location",
|
|
29
|
+
"Schema": {
|
|
30
|
+
"Type": "struct",
|
|
31
|
+
"Fields": [
|
|
32
|
+
{
|
|
33
|
+
"Name": "column",
|
|
34
|
+
"Type": "string",
|
|
35
|
+
"Id": 1,
|
|
36
|
+
"Required": true
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"MyTableCompactionOptimizer": {
|
|
46
|
+
"Type": "AWS::Glue::TableOptimizer",
|
|
47
|
+
"DependsOn": "MyTable",
|
|
48
|
+
"Properties": {
|
|
49
|
+
"CatalogId": {
|
|
50
|
+
"Ref": "AWS::AccountId"
|
|
51
|
+
},
|
|
52
|
+
"DatabaseName": "my_database",
|
|
53
|
+
"TableName": "my_table",
|
|
54
|
+
"Type": "compaction",
|
|
55
|
+
"TableOptimizerConfiguration": {
|
|
56
|
+
"RoleArn": {
|
|
57
|
+
"Fn::GetAtt": [
|
|
58
|
+
"CompactionRole",
|
|
59
|
+
"Arn"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"Enabled": true
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"Outputs": {}
|
|
68
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AWSTemplateFormatVersion": "2010-09-09",
|
|
3
|
+
"Metadata": {},
|
|
4
|
+
"Parameters": {},
|
|
5
|
+
"Rules": {},
|
|
6
|
+
"Mappings": {},
|
|
7
|
+
"Conditions": {},
|
|
8
|
+
"Resources": {
|
|
9
|
+
"MyTable": {
|
|
10
|
+
"Type": "AWS::Glue::Table",
|
|
11
|
+
"Properties": {
|
|
12
|
+
"CatalogId": {
|
|
13
|
+
"Ref": "AWS::AccountId"
|
|
14
|
+
},
|
|
15
|
+
"DatabaseName": "my_database",
|
|
16
|
+
"Name": "my_table",
|
|
17
|
+
"OpenTableFormatInput": {
|
|
18
|
+
"IcebergInput": {
|
|
19
|
+
"MetadataOperation": "CREATE",
|
|
20
|
+
"Version": "2",
|
|
21
|
+
"IcebergTableInput": {
|
|
22
|
+
"Location": "s3://fake/location",
|
|
23
|
+
"Schema": {
|
|
24
|
+
"Type": "struct",
|
|
25
|
+
"Fields": [
|
|
26
|
+
{
|
|
27
|
+
"Name": "column",
|
|
28
|
+
"Type": "string",
|
|
29
|
+
"Id": 1,
|
|
30
|
+
"Required": true
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"MyTableCompactionOptimizer": {
|
|
40
|
+
"Type": "AWS::Glue::TableOptimizer",
|
|
41
|
+
"DependsOn": "MyTable",
|
|
42
|
+
"Properties": {
|
|
43
|
+
"CatalogId": {
|
|
44
|
+
"Ref": "AWS::AccountId"
|
|
45
|
+
},
|
|
46
|
+
"DatabaseName": "my_database",
|
|
47
|
+
"TableName": "my_table",
|
|
48
|
+
"Type": "compaction",
|
|
49
|
+
"TableOptimizerConfiguration": {
|
|
50
|
+
"RoleArn": "arn:aws:iam::123456789012:role/CompactionRole",
|
|
51
|
+
"Enabled": true
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"Outputs": {}
|
|
57
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AWSTemplateFormatVersion": "2010-09-09",
|
|
3
|
+
"Metadata": {},
|
|
4
|
+
"Parameters": {},
|
|
5
|
+
"Rules": {},
|
|
6
|
+
"Mappings": {},
|
|
7
|
+
"Conditions": {},
|
|
8
|
+
"Resources": {
|
|
9
|
+
"OptimizerRole": {
|
|
10
|
+
"Type": "AWS::IAM::Role",
|
|
11
|
+
"Properties": {
|
|
12
|
+
"AssumeRolePolicyDocument": {}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"MyTable": {
|
|
16
|
+
"Type": "AWS::Glue::Table",
|
|
17
|
+
"Properties": {
|
|
18
|
+
"CatalogId": {
|
|
19
|
+
"Ref": "AWS::AccountId"
|
|
20
|
+
},
|
|
21
|
+
"DatabaseName": "my_database",
|
|
22
|
+
"Name": "my_table",
|
|
23
|
+
"OpenTableFormatInput": {
|
|
24
|
+
"IcebergInput": {
|
|
25
|
+
"MetadataOperation": "CREATE",
|
|
26
|
+
"Version": "2",
|
|
27
|
+
"IcebergTableInput": {
|
|
28
|
+
"Location": "s3://fake/location",
|
|
29
|
+
"Schema": {
|
|
30
|
+
"Type": "struct",
|
|
31
|
+
"Fields": [
|
|
32
|
+
{
|
|
33
|
+
"Name": "column",
|
|
34
|
+
"Type": "string",
|
|
35
|
+
"Id": 1,
|
|
36
|
+
"Required": true
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"MyTableRetentionOptimizer": {
|
|
46
|
+
"Type": "AWS::Glue::TableOptimizer",
|
|
47
|
+
"DependsOn": "MyTable",
|
|
48
|
+
"Properties": {
|
|
49
|
+
"CatalogId": {
|
|
50
|
+
"Ref": "AWS::AccountId"
|
|
51
|
+
},
|
|
52
|
+
"DatabaseName": "my_database",
|
|
53
|
+
"TableName": "my_table",
|
|
54
|
+
"Type": "retention",
|
|
55
|
+
"TableOptimizerConfiguration": {
|
|
56
|
+
"RoleArn": {
|
|
57
|
+
"Fn::GetAtt": [
|
|
58
|
+
"OptimizerRole",
|
|
59
|
+
"Arn"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"Enabled": true,
|
|
63
|
+
"RetentionConfiguration": {
|
|
64
|
+
"IcebergConfiguration": {
|
|
65
|
+
"SnapshotRetentionPeriodInDays": 7,
|
|
66
|
+
"NumberOfSnapshotsToRetain": 3,
|
|
67
|
+
"CleanExpiredFiles": false
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"Outputs": {}
|
|
75
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AWSTemplateFormatVersion": "2010-09-09",
|
|
3
|
+
"Metadata": {},
|
|
4
|
+
"Parameters": {},
|
|
5
|
+
"Rules": {},
|
|
6
|
+
"Mappings": {},
|
|
7
|
+
"Conditions": {},
|
|
8
|
+
"Resources": {
|
|
9
|
+
"MyTable": {
|
|
10
|
+
"Type": "AWS::Glue::Table",
|
|
11
|
+
"Properties": {
|
|
12
|
+
"CatalogId": {
|
|
13
|
+
"Ref": "AWS::AccountId"
|
|
14
|
+
},
|
|
15
|
+
"DatabaseName": "my_database",
|
|
16
|
+
"Name": "my_table",
|
|
17
|
+
"OpenTableFormatInput": {
|
|
18
|
+
"IcebergInput": {
|
|
19
|
+
"MetadataOperation": "CREATE",
|
|
20
|
+
"Version": "2",
|
|
21
|
+
"IcebergTableInput": {
|
|
22
|
+
"Location": "s3://fake/location",
|
|
23
|
+
"Schema": {
|
|
24
|
+
"Type": "struct",
|
|
25
|
+
"Fields": [
|
|
26
|
+
{
|
|
27
|
+
"Name": "column",
|
|
28
|
+
"Type": "string",
|
|
29
|
+
"Id": 1,
|
|
30
|
+
"Required": true
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"MyTableRetentionOptimizer": {
|
|
40
|
+
"Type": "AWS::Glue::TableOptimizer",
|
|
41
|
+
"DependsOn": "MyTable",
|
|
42
|
+
"Properties": {
|
|
43
|
+
"CatalogId": {
|
|
44
|
+
"Ref": "AWS::AccountId"
|
|
45
|
+
},
|
|
46
|
+
"DatabaseName": "my_database",
|
|
47
|
+
"TableName": "my_table",
|
|
48
|
+
"Type": "retention",
|
|
49
|
+
"TableOptimizerConfiguration": {
|
|
50
|
+
"RoleArn": "arn:aws:iam::123456789012:role/OptimizerRole",
|
|
51
|
+
"Enabled": true,
|
|
52
|
+
"RetentionConfiguration": {
|
|
53
|
+
"IcebergConfiguration": {
|
|
54
|
+
"SnapshotRetentionPeriodInDays": 5,
|
|
55
|
+
"NumberOfSnapshotsToRetain": 1,
|
|
56
|
+
"CleanExpiredFiles": true
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"Outputs": {}
|
|
64
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AWSTemplateFormatVersion": "2010-09-09",
|
|
3
|
+
"Metadata": {},
|
|
4
|
+
"Parameters": {},
|
|
5
|
+
"Rules": {},
|
|
6
|
+
"Mappings": {},
|
|
7
|
+
"Conditions": {},
|
|
8
|
+
"Resources": {
|
|
9
|
+
"OrphanFileDeletionRole": {
|
|
10
|
+
"Type": "AWS::IAM::Role",
|
|
11
|
+
"Properties": {
|
|
12
|
+
"AssumeRolePolicyDocument": {}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"MyTable": {
|
|
16
|
+
"Type": "AWS::Glue::Table",
|
|
17
|
+
"Properties": {
|
|
18
|
+
"CatalogId": {
|
|
19
|
+
"Ref": "AWS::AccountId"
|
|
20
|
+
},
|
|
21
|
+
"DatabaseName": "my_database",
|
|
22
|
+
"Name": "my_table",
|
|
23
|
+
"OpenTableFormatInput": {
|
|
24
|
+
"IcebergInput": {
|
|
25
|
+
"MetadataOperation": "CREATE",
|
|
26
|
+
"Version": "2",
|
|
27
|
+
"IcebergTableInput": {
|
|
28
|
+
"Location": "s3://fake/location",
|
|
29
|
+
"Schema": {
|
|
30
|
+
"Type": "struct",
|
|
31
|
+
"Fields": [
|
|
32
|
+
{
|
|
33
|
+
"Name": "column",
|
|
34
|
+
"Type": "string",
|
|
35
|
+
"Id": 1,
|
|
36
|
+
"Required": true
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"MyTableOrphanFileDeletionOptimizer": {
|
|
46
|
+
"Type": "AWS::Glue::TableOptimizer",
|
|
47
|
+
"DependsOn": "MyTable",
|
|
48
|
+
"Properties": {
|
|
49
|
+
"CatalogId": {
|
|
50
|
+
"Ref": "AWS::AccountId"
|
|
51
|
+
},
|
|
52
|
+
"DatabaseName": "my_database",
|
|
53
|
+
"TableName": "my_table",
|
|
54
|
+
"Type": "orphan_file_deletion",
|
|
55
|
+
"TableOptimizerConfiguration": {
|
|
56
|
+
"RoleArn": {
|
|
57
|
+
"Fn::GetAtt": [
|
|
58
|
+
"OrphanFileDeletionRole",
|
|
59
|
+
"Arn"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"Enabled": true,
|
|
63
|
+
"OrphanFileDeletionConfiguration": {
|
|
64
|
+
"IcebergConfiguration": {
|
|
65
|
+
"OrphanFileRetentionPeriodInDays": 7,
|
|
66
|
+
"Location": "s3://fake/location/subdir"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"Outputs": {}
|
|
74
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"AWSTemplateFormatVersion": "2010-09-09",
|
|
3
|
+
"Metadata": {},
|
|
4
|
+
"Parameters": {},
|
|
5
|
+
"Rules": {},
|
|
6
|
+
"Mappings": {},
|
|
7
|
+
"Conditions": {},
|
|
8
|
+
"Resources": {
|
|
9
|
+
"MyTable": {
|
|
10
|
+
"Type": "AWS::Glue::Table",
|
|
11
|
+
"Properties": {
|
|
12
|
+
"CatalogId": {
|
|
13
|
+
"Ref": "AWS::AccountId"
|
|
14
|
+
},
|
|
15
|
+
"DatabaseName": "my_database",
|
|
16
|
+
"Name": "my_table",
|
|
17
|
+
"OpenTableFormatInput": {
|
|
18
|
+
"IcebergInput": {
|
|
19
|
+
"MetadataOperation": "CREATE",
|
|
20
|
+
"Version": "2",
|
|
21
|
+
"IcebergTableInput": {
|
|
22
|
+
"Location": "s3://fake/location",
|
|
23
|
+
"Schema": {
|
|
24
|
+
"Type": "struct",
|
|
25
|
+
"Fields": [
|
|
26
|
+
{
|
|
27
|
+
"Name": "column",
|
|
28
|
+
"Type": "string",
|
|
29
|
+
"Id": 1,
|
|
30
|
+
"Required": true
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"MyTableOrphanFileDeletionOptimizer": {
|
|
40
|
+
"Type": "AWS::Glue::TableOptimizer",
|
|
41
|
+
"DependsOn": "MyTable",
|
|
42
|
+
"Properties": {
|
|
43
|
+
"CatalogId": {
|
|
44
|
+
"Ref": "AWS::AccountId"
|
|
45
|
+
},
|
|
46
|
+
"DatabaseName": "my_database",
|
|
47
|
+
"TableName": "my_table",
|
|
48
|
+
"Type": "orphan_file_deletion",
|
|
49
|
+
"TableOptimizerConfiguration": {
|
|
50
|
+
"RoleArn": "arn:aws:iam::123456789012:role/OrphanFileDeletionRole",
|
|
51
|
+
"Enabled": true,
|
|
52
|
+
"OrphanFileDeletionConfiguration": {
|
|
53
|
+
"IcebergConfiguration": {
|
|
54
|
+
"OrphanFileRetentionPeriodInDays": 3
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"Outputs": {}
|
|
62
|
+
}
|