Skip to content

Commit f1df9ab

Browse files
authored
feat(glue): glue tables can include storage parameters (#24498)
Includes a `storageParameters` property, allowing developers to access the `tableInput.storageDescriptor.parameters` property within the `CfnTable` resource. Closes #23132. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 6c588da commit f1df9ab

16 files changed

+964
-118
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":"32.0.0"}
1+
{"version":"32.0.0"}

packages/@aws-cdk/aws-glue-alpha/README.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,25 @@ new glue.Table(this, 'MyTable', {
223223
});
224224
```
225225

226-
By default, an S3 bucket will be created to store the table's data and stored in the bucket root. You can also manually pass the `bucket` and `s3Prefix`:
226+
Glue tables can be configured to contain user-defined properties, to describe the physical storage of table data, through the `storageParameters` property:
227+
228+
```ts
229+
declare const myDatabase: glue.Database;
230+
new glue.Table(this, 'MyTable', {
231+
storageParameters: [
232+
glue.StorageParameter.skipHeaderLineCount(1),
233+
glue.StorageParameter.compressionType(glue.CompressionType.GZIP),
234+
glue.StorageParameter.custom('separatorChar', ',')
235+
],
236+
// ...
237+
database: myDatabase,
238+
columns: [{
239+
name: 'col1',
240+
type: glue.Schema.STRING,
241+
}],
242+
dataFormat: glue.DataFormat.JSON,
243+
});
244+
```
227245

228246
### Partition Keys
229247

Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
// AWS::Glue CloudFormation Resources:
22

3+
export * from './code';
34
export * from './connection';
45
export * from './data-format';
56
export * from './data-quality-ruleset';
67
export * from './database';
78
export * from './job';
89
export * from './job-executable';
9-
export * from './code';
1010
export * from './schema';
1111
export * from './security-configuration';
12-
export * from './table';
12+
export * from './storage-parameter';
13+
export * from './table';

0 commit comments

Comments
 (0)