@aws-cdk/aws-glue-alpha 2.117.0-alpha.0 → 2.118.0-alpha.0
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/.jsii +108 -43
- package/.jsii.tabl.json.gz +0 -0
- package/LICENSE +1 -1
- package/NOTICE +1 -1
- package/README.md +22 -1
- package/lib/code.js +3 -3
- package/lib/connection.js +2 -2
- package/lib/data-format.js +5 -5
- package/lib/data-quality-ruleset.js +2 -2
- package/lib/database.d.ts +6 -0
- package/lib/database.js +12 -3
- package/lib/external-table.js +3 -2
- package/lib/job-executable.js +4 -4
- package/lib/job.js +2 -2
- package/lib/s3-table.js +3 -2
- package/lib/schema.js +1 -1
- package/lib/security-configuration.js +1 -1
- package/lib/storage-parameter.js +1 -1
- package/lib/table-base.d.ts +18 -0
- package/lib/table-base.js +3 -2
- package/lib/table-deprecated.js +1 -1
- package/package.json +7 -7
package/.jsii
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://aws.amazon.com"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"aws-cdk-lib": "^2.
|
|
11
|
+
"aws-cdk-lib": "^2.118.0",
|
|
12
12
|
"constructs": "^10.0.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencyClosure": {
|
|
@@ -3658,7 +3658,7 @@
|
|
|
3658
3658
|
},
|
|
3659
3659
|
"name": "@aws-cdk/aws-glue-alpha",
|
|
3660
3660
|
"readme": {
|
|
3661
|
-
"markdown": "# AWS Glue Construct Library\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\nThis module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.\n\n## Job\n\nA `Job` encapsulates a script that connects to data sources, processes them, and then writes output to a data target.\n\nThere are 3 types of jobs supported by AWS Glue: Spark ETL, Spark Streaming, and Python Shell jobs.\n\nThe `glue.JobExecutable` allows you to specify the type of job, the language to use and the code assets required by the job.\n\n`glue.Code` allows you to refer to the different code assets required by the job, either from an existing S3 location or from a local file path.\n\n`glue.ExecutionClass` allows you to specify `FLEX` or `STANDARD`. `FLEX` is appropriate for non-urgent jobs such as pre-production jobs, testing, and one-time data loads.\n\n### Spark Jobs\n\nThese jobs run in an Apache Spark environment managed by AWS Glue.\n\n#### ETL Jobs\n\nAn ETL job processes data in batches using Apache Spark.\n\n```ts\ndeclare const bucket: s3.Bucket;\nnew glue.Job(this, 'ScalaSparkEtlJob', {\n executable: glue.JobExecutable.scalaEtl({\n glueVersion: glue.GlueVersion.V4_0,\n script: glue.Code.fromBucket(bucket, 'src/com/example/HelloWorld.scala'),\n className: 'com.example.HelloWorld',\n extraJars: [glue.Code.fromBucket(bucket, 'jars/HelloWorld.jar')],\n }),\n workerType: glue.WorkerType.G_8X,\n description: 'an example Scala ETL job',\n});\n```\n\n#### Streaming Jobs\n\nA Streaming job is similar to an ETL job, except that it performs ETL on data streams. It uses the Apache Spark Structured Streaming framework. Some Spark job features are not available to streaming ETL jobs.\n\n```ts\nnew glue.Job(this, 'PythonSparkStreamingJob', {\n executable: glue.JobExecutable.pythonStreaming({\n glueVersion: glue.GlueVersion.V4_0,\n pythonVersion: glue.PythonVersion.THREE,\n script: glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world.py')),\n }),\n description: 'an example Python Streaming job',\n});\n```\n\n### Python Shell Jobs\n\nA Python shell job runs Python scripts as a shell and supports a Python version that depends on the AWS Glue version you are using.\nThis can be used to schedule and run tasks that don't require an Apache Spark environment. Currently, three flavors are supported:\n\n* PythonVersion.TWO (2.7; EOL)\n* PythonVersion.THREE (3.6)\n* PythonVersion.THREE_NINE (3.9)\n\n```ts\ndeclare const bucket: s3.Bucket;\nnew glue.Job(this, 'PythonShellJob', {\n executable: glue.JobExecutable.pythonShell({\n glueVersion: glue.GlueVersion.V1_0,\n pythonVersion: glue.PythonVersion.THREE,\n script: glue.Code.fromBucket(bucket, 'script.py'),\n }),\n description: 'an example Python Shell job',\n});\n```\n\n### Ray Jobs\n\nThese jobs run in a Ray environment managed by AWS Glue.\n\n```ts\nnew glue.Job(this, 'RayJob', {\n executable: glue.JobExecutable.pythonRay({\n glueVersion: glue.GlueVersion.V4_0,\n pythonVersion: glue.PythonVersion.THREE_NINE,\n runtime: glue.Runtime.RAY_TWO_FOUR,\n script: glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world.py')),\n }),\n workerType: glue.WorkerType.Z_2X,\n workerCount: 2,\n description: 'an example Ray job'\n});\n```\n\n### Enable Spark UI\n\nEnable Spark UI setting the `sparkUI` property.\n\n```ts\nnew glue.Job(this, 'EnableSparkUI', {\n jobName: 'EtlJobWithSparkUIPrefix',\n sparkUI: {\n enabled: true,\n },\n executable: glue.JobExecutable.pythonEtl({\n glueVersion: glue.GlueVersion.V3_0,\n pythonVersion: glue.PythonVersion.THREE,\n script: glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world.py')),\n }),\n});\n```\n\nThe `sparkUI` property also allows the specification of an s3 bucket and a bucket prefix.\n\nSee [documentation](https://docs.aws.amazon.com/glue/latest/dg/add-job.html) for more information on adding jobs in Glue.\n\n## Connection\n\nA `Connection` allows Glue jobs, crawlers and development endpoints to access certain types of data stores. For example, to create a network connection to connect to a data source within a VPC:\n\n```ts\ndeclare const securityGroup: ec2.SecurityGroup;\ndeclare const subnet: ec2.Subnet;\nnew glue.Connection(this, 'MyConnection', {\n type: glue.ConnectionType.NETWORK,\n // The security groups granting AWS Glue inbound access to the data source within the VPC\n securityGroups: [securityGroup],\n // The VPC subnet which contains the data source\n subnet,\n});\n```\n\nFor RDS `Connection` by JDBC, it is recommended to manage credentials using AWS Secrets Manager. To use Secret, specify `SECRET_ID` in `properties` like the following code. Note that in this case, the subnet must have a route to the AWS Secrets Manager VPC endpoint or to the AWS Secrets Manager endpoint through a NAT gateway.\n\n```ts\ndeclare const securityGroup: ec2.SecurityGroup;\ndeclare const subnet: ec2.Subnet;\ndeclare const db: rds.DatabaseCluster;\nnew glue.Connection(this, \"RdsConnection\", {\n type: glue.ConnectionType.JDBC,\n securityGroups: [securityGroup],\n subnet,\n properties: {\n JDBC_CONNECTION_URL: `jdbc:mysql://${db.clusterEndpoint.socketAddress}/databasename`,\n JDBC_ENFORCE_SSL: \"false\",\n SECRET_ID: db.secret!.secretName,\n },\n});\n```\n\nIf you need to use a connection type that doesn't exist as a static member on `ConnectionType`, you can instantiate a `ConnectionType` object, e.g: `new glue.ConnectionType('NEW_TYPE')`.\n\nSee [Adding a Connection to Your Data Store](https://docs.aws.amazon.com/glue/latest/dg/populate-add-connection.html) and [Connection Structure](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-connections.html#aws-glue-api-catalog-connections-Connection) documentation for more information on the supported data stores and their configurations.\n\n## SecurityConfiguration\n\nA `SecurityConfiguration` is a set of security properties that can be used by AWS Glue to encrypt data at rest.\n\n```ts\nnew glue.SecurityConfiguration(this, 'MySecurityConfiguration', {\n cloudWatchEncryption: {\n mode: glue.CloudWatchEncryptionMode.KMS,\n },\n jobBookmarksEncryption: {\n mode: glue.JobBookmarksEncryptionMode.CLIENT_SIDE_KMS,\n },\n s3Encryption: {\n mode: glue.S3EncryptionMode.KMS,\n },\n});\n```\n\nBy default, a shared KMS key is created for use with the encryption configurations that require one. You can also supply your own key for each encryption config, for example, for CloudWatch encryption:\n\n```ts\ndeclare const key: kms.Key;\nnew glue.SecurityConfiguration(this, 'MySecurityConfiguration', {\n cloudWatchEncryption: {\n mode: glue.CloudWatchEncryptionMode.KMS,\n kmsKey: key,\n },\n});\n```\n\nSee [documentation](https://docs.aws.amazon.com/glue/latest/dg/encryption-security-configuration.html) for more info for Glue encrypting data written by Crawlers, Jobs, and Development Endpoints.\n\n## Database\n\nA `Database` is a logical grouping of `Tables` in the Glue Catalog.\n\n```ts\nnew glue.Database(this, 'MyDatabase');\n```\n\n## Table\n\nA Glue table describes a table of data in S3: its structure (column names and types), location of data (S3 objects with a common prefix in a S3 bucket), and format for the files (Json, Avro, Parquet, etc.):\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }, {\n name: 'col2',\n type: glue.Schema.array(glue.Schema.STRING),\n comment: 'col2 is an array of strings' // comment is optional\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\nBy default, a S3 bucket will be created to store the table's data but you can manually pass the `bucket` and `s3Prefix`:\n\n```ts\ndeclare const myBucket: s3.Bucket;\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n bucket: myBucket,\n s3Prefix: 'my-table/',\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\nGlue tables can be configured to contain user-defined properties, to describe the physical storage of table data, through the `storageParameters` property:\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n storageParameters: [\n glue.StorageParameter.skipHeaderLineCount(1),\n glue.StorageParameter.compressionType(glue.CompressionType.GZIP),\n glue.StorageParameter.custom('separatorChar', ',')\n ],\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n### Partition Keys\n\nTo improve query performance, a table can specify `partitionKeys` on which data is stored and queried separately. For example, you might partition a table by `year` and `month` to optimize queries based on a time window:\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n partitionKeys: [{\n name: 'year',\n type: glue.Schema.SMALL_INT,\n }, {\n name: 'month',\n type: glue.Schema.SMALL_INT,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n### Partition Indexes\n\nAnother way to improve query performance is to specify partition indexes. If no partition indexes are\npresent on the table, AWS Glue loads all partitions of the table and filters the loaded partitions using\nthe query expression. The query takes more time to run as the number of partitions increase. With an\nindex, the query will try to fetch a subset of the partitions instead of loading all partitions of the\ntable.\n\nThe keys of a partition index must be a subset of the partition keys of the table. You can have a\nmaximum of 3 partition indexes per table. To specify a partition index, you can use the `partitionIndexes`\nproperty:\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n partitionKeys: [{\n name: 'year',\n type: glue.Schema.SMALL_INT,\n }, {\n name: 'month',\n type: glue.Schema.SMALL_INT,\n }],\n partitionIndexes: [{\n indexName: 'my-index', // optional\n keyNames: ['year'],\n }], // supply up to 3 indexes\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\nAlternatively, you can call the `addPartitionIndex()` function on a table:\n\n```ts\ndeclare const myTable: glue.Table;\nmyTable.addPartitionIndex({\n indexName: 'my-index',\n keyNames: ['year'],\n});\n```\n\n### Partition Filtering\n\nIf you have a table with a large number of partitions that grows over time, consider using AWS Glue partition indexing and filtering.\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n partitionKeys: [{\n name: 'year',\n type: glue.Schema.SMALL_INT,\n }, {\n name: 'month',\n type: glue.Schema.SMALL_INT,\n }],\n dataFormat: glue.DataFormat.JSON,\n enablePartitionFiltering: true,\n});\n```\n\n### Glue Connections\n\nGlue connections allow external data connections to third party databases and data warehouses. However, these connections can also be assigned to Glue Tables, allowing you to query external data sources using the Glue Data Catalog.\n\nWhereas `S3Table` will point to (and if needed, create) a bucket to store the tables' data, `ExternalTable` will point to an existing table in a data source. For example, to create a table in Glue that points to a table in Redshift:\n\n```ts\ndeclare const myConnection: glue.Connection;\ndeclare const myDatabase: glue.Database;\nnew glue.ExternalTable(this, 'MyTable', {\n connection: myConnection,\n externalDataLocation: 'default_db_public_example', // A table in Redshift\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n## [Encryption](https://docs.aws.amazon.com/athena/latest/ug/encryption.html)\n\nYou can enable encryption on a Table's data:\n\n* [S3Managed](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) - (default) Server side encryption (`SSE-S3`) with an Amazon S3-managed key.\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n encryption: glue.TableEncryption.S3_MANAGED,\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n* [Kms](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) - Server-side encryption (`SSE-KMS`) with an AWS KMS Key managed by the account owner.\n\n```ts\ndeclare const myDatabase: glue.Database;\n// KMS key is created automatically\nnew glue.S3Table(this, 'MyTable', {\n encryption: glue.TableEncryption.KMS,\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n\n// with an explicit KMS key\nnew glue.S3Table(this, 'MyTable', {\n encryption: glue.TableEncryption.KMS,\n encryptionKey: new kms.Key(this, 'MyKey'),\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n* [KmsManaged](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) - Server-side encryption (`SSE-KMS`), like `Kms`, except with an AWS KMS Key managed by the AWS Key Management Service.\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n encryption: glue.TableEncryption.KMS_MANAGED,\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n* [ClientSideKms](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html#client-side-encryption-kms-managed-master-key-intro) - Client-side encryption (`CSE-KMS`) with an AWS KMS Key managed by the account owner.\n\n```ts\ndeclare const myDatabase: glue.Database;\n// KMS key is created automatically\nnew glue.S3Table(this, 'MyTable', {\n encryption: glue.TableEncryption.CLIENT_SIDE_KMS,\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n\n// with an explicit KMS key\nnew glue.S3Table(this, 'MyTable', {\n encryption: glue.TableEncryption.CLIENT_SIDE_KMS,\n encryptionKey: new kms.Key(this, 'MyKey'),\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n*Note: you cannot provide a `Bucket` when creating the `S3Table` if you wish to use server-side encryption (`KMS`, `KMS_MANAGED` or `S3_MANAGED`)*.\n\n## Types\n\nA table's schema is a collection of columns, each of which have a `name` and a `type`. Types are recursive structures, consisting of primitive and complex types:\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n columns: [{\n name: 'primitive_column',\n type: glue.Schema.STRING,\n }, {\n name: 'array_column',\n type: glue.Schema.array(glue.Schema.INTEGER),\n comment: 'array<integer>',\n }, {\n name: 'map_column',\n type: glue.Schema.map(\n glue.Schema.STRING,\n glue.Schema.TIMESTAMP),\n comment: 'map<string,string>',\n }, {\n name: 'struct_column',\n type: glue.Schema.struct([{\n name: 'nested_column',\n type: glue.Schema.DATE,\n comment: 'nested comment',\n }]),\n comment: \"struct<nested_column:date COMMENT 'nested comment'>\",\n }],\n // ...\n database: myDatabase,\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n### Primitives\n\n#### Numeric\n\n| Name \t| Type \t| Comments |\n|-----------\t|----------\t|------------------------------------------------------------------------------------------------------------------\t|\n| FLOAT \t| Constant \t| A 32-bit single-precision floating point number |\n| INTEGER \t| Constant \t| A 32-bit signed value in two's complement format, with a minimum value of -2^31 and a maximum value of 2^31-1 \t|\n| DOUBLE \t| Constant \t| A 64-bit double-precision floating point number |\n| BIG_INT \t| Constant \t| A 64-bit signed INTEGER in two’s complement format, with a minimum value of -2^63 and a maximum value of 2^63 -1 |\n| SMALL_INT \t| Constant \t| A 16-bit signed INTEGER in two’s complement format, with a minimum value of -2^15 and a maximum value of 2^15-1 |\n| TINY_INT \t| Constant \t| A 8-bit signed INTEGER in two’s complement format, with a minimum value of -2^7 and a maximum value of 2^7-1 |\n\n#### Date and time\n\n| Name \t| Type \t| Comments \t|\n|-----------\t|----------\t|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------\t|\n| DATE \t| Constant \t| A date in UNIX format, such as YYYY-MM-DD. \t|\n| TIMESTAMP \t| Constant \t| Date and time instant in the UNiX format, such as yyyy-mm-dd hh:mm:ss[.f...]. For example, TIMESTAMP '2008-09-15 03:04:05.324'. This format uses the session time zone. \t|\n\n#### String\n\n| Name \t| Type \t| Comments \t|\n|--------------------------------------------\t|----------\t|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\t|\n| STRING \t| Constant \t| A string literal enclosed in single or double quotes \t|\n| decimal(precision: number, scale?: number) \t| Function \t| `precision` is the total number of digits. `scale` (optional) is the number of digits in fractional part with a default of 0. For example, use these type definitions: decimal(11,5), decimal(15) \t|\n| char(length: number) \t| Function \t| Fixed length character data, with a specified length between 1 and 255, such as char(10) \t|\n| varchar(length: number) \t| Function \t| Variable length character data, with a specified length between 1 and 65535, such as varchar(10) \t|\n\n#### Miscellaneous\n\n| Name \t| Type \t| Comments \t|\n|---------\t|----------\t|-------------------------------\t|\n| BOOLEAN \t| Constant \t| Values are `true` and `false` \t|\n| BINARY \t| Constant \t| Value is in binary \t|\n\n### Complex\n\n| Name \t| Type \t| Comments \t|\n|-------------------------------------\t|----------\t|-------------------------------------------------------------------\t|\n| array(itemType: Type) \t| Function \t| An array of some other type \t|\n| map(keyType: Type, valueType: Type) \t| Function \t| A map of some primitive key type to any value type \t|\n| struct(collumns: Column[]) \t| Function \t| Nested structure containing individually named and typed collumns \t|\n\n## Data Quality Ruleset\n\nA `DataQualityRuleset` specifies a data quality ruleset with DQDL rules applied to a specified AWS Glue table. For example, to create a data quality ruleset for a given table:\n\n```ts\nnew glue.DataQualityRuleset(this, 'MyDataQualityRuleset', {\n clientToken: 'client_token',\n description: 'description',\n rulesetName: 'ruleset_name',\n rulesetDqdl: 'ruleset_dqdl',\n tags: {\n key1: 'value1',\n key2: 'value2',\n },\n targetTable: new glue.DataQualityTargetTable('database_name', 'table_name'),\n});\n```\n\nFor more information, see [AWS Glue Data Quality](https://docs.aws.amazon.com/glue/latest/dg/glue-data-quality.html).\n"
|
|
3661
|
+
"markdown": "# AWS Glue Construct Library\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\nThis module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.\n\n## Job\n\nA `Job` encapsulates a script that connects to data sources, processes them, and then writes output to a data target.\n\nThere are 3 types of jobs supported by AWS Glue: Spark ETL, Spark Streaming, and Python Shell jobs.\n\nThe `glue.JobExecutable` allows you to specify the type of job, the language to use and the code assets required by the job.\n\n`glue.Code` allows you to refer to the different code assets required by the job, either from an existing S3 location or from a local file path.\n\n`glue.ExecutionClass` allows you to specify `FLEX` or `STANDARD`. `FLEX` is appropriate for non-urgent jobs such as pre-production jobs, testing, and one-time data loads.\n\n### Spark Jobs\n\nThese jobs run in an Apache Spark environment managed by AWS Glue.\n\n#### ETL Jobs\n\nAn ETL job processes data in batches using Apache Spark.\n\n```ts\ndeclare const bucket: s3.Bucket;\nnew glue.Job(this, 'ScalaSparkEtlJob', {\n executable: glue.JobExecutable.scalaEtl({\n glueVersion: glue.GlueVersion.V4_0,\n script: glue.Code.fromBucket(bucket, 'src/com/example/HelloWorld.scala'),\n className: 'com.example.HelloWorld',\n extraJars: [glue.Code.fromBucket(bucket, 'jars/HelloWorld.jar')],\n }),\n workerType: glue.WorkerType.G_8X,\n description: 'an example Scala ETL job',\n});\n```\n\n#### Streaming Jobs\n\nA Streaming job is similar to an ETL job, except that it performs ETL on data streams. It uses the Apache Spark Structured Streaming framework. Some Spark job features are not available to streaming ETL jobs.\n\n```ts\nnew glue.Job(this, 'PythonSparkStreamingJob', {\n executable: glue.JobExecutable.pythonStreaming({\n glueVersion: glue.GlueVersion.V4_0,\n pythonVersion: glue.PythonVersion.THREE,\n script: glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world.py')),\n }),\n description: 'an example Python Streaming job',\n});\n```\n\n### Python Shell Jobs\n\nA Python shell job runs Python scripts as a shell and supports a Python version that depends on the AWS Glue version you are using.\nThis can be used to schedule and run tasks that don't require an Apache Spark environment. Currently, three flavors are supported:\n\n* PythonVersion.TWO (2.7; EOL)\n* PythonVersion.THREE (3.6)\n* PythonVersion.THREE_NINE (3.9)\n\n```ts\ndeclare const bucket: s3.Bucket;\nnew glue.Job(this, 'PythonShellJob', {\n executable: glue.JobExecutable.pythonShell({\n glueVersion: glue.GlueVersion.V1_0,\n pythonVersion: glue.PythonVersion.THREE,\n script: glue.Code.fromBucket(bucket, 'script.py'),\n }),\n description: 'an example Python Shell job',\n});\n```\n\n### Ray Jobs\n\nThese jobs run in a Ray environment managed by AWS Glue.\n\n```ts\nnew glue.Job(this, 'RayJob', {\n executable: glue.JobExecutable.pythonRay({\n glueVersion: glue.GlueVersion.V4_0,\n pythonVersion: glue.PythonVersion.THREE_NINE,\n runtime: glue.Runtime.RAY_TWO_FOUR,\n script: glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world.py')),\n }),\n workerType: glue.WorkerType.Z_2X,\n workerCount: 2,\n description: 'an example Ray job'\n});\n```\n\n### Enable Spark UI\n\nEnable Spark UI setting the `sparkUI` property.\n\n```ts\nnew glue.Job(this, 'EnableSparkUI', {\n jobName: 'EtlJobWithSparkUIPrefix',\n sparkUI: {\n enabled: true,\n },\n executable: glue.JobExecutable.pythonEtl({\n glueVersion: glue.GlueVersion.V3_0,\n pythonVersion: glue.PythonVersion.THREE,\n script: glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world.py')),\n }),\n});\n```\n\nThe `sparkUI` property also allows the specification of an s3 bucket and a bucket prefix.\n\nSee [documentation](https://docs.aws.amazon.com/glue/latest/dg/add-job.html) for more information on adding jobs in Glue.\n\n## Connection\n\nA `Connection` allows Glue jobs, crawlers and development endpoints to access certain types of data stores. For example, to create a network connection to connect to a data source within a VPC:\n\n```ts\ndeclare const securityGroup: ec2.SecurityGroup;\ndeclare const subnet: ec2.Subnet;\nnew glue.Connection(this, 'MyConnection', {\n type: glue.ConnectionType.NETWORK,\n // The security groups granting AWS Glue inbound access to the data source within the VPC\n securityGroups: [securityGroup],\n // The VPC subnet which contains the data source\n subnet,\n});\n```\n\nFor RDS `Connection` by JDBC, it is recommended to manage credentials using AWS Secrets Manager. To use Secret, specify `SECRET_ID` in `properties` like the following code. Note that in this case, the subnet must have a route to the AWS Secrets Manager VPC endpoint or to the AWS Secrets Manager endpoint through a NAT gateway.\n\n```ts\ndeclare const securityGroup: ec2.SecurityGroup;\ndeclare const subnet: ec2.Subnet;\ndeclare const db: rds.DatabaseCluster;\nnew glue.Connection(this, \"RdsConnection\", {\n type: glue.ConnectionType.JDBC,\n securityGroups: [securityGroup],\n subnet,\n properties: {\n JDBC_CONNECTION_URL: `jdbc:mysql://${db.clusterEndpoint.socketAddress}/databasename`,\n JDBC_ENFORCE_SSL: \"false\",\n SECRET_ID: db.secret!.secretName,\n },\n});\n```\n\nIf you need to use a connection type that doesn't exist as a static member on `ConnectionType`, you can instantiate a `ConnectionType` object, e.g: `new glue.ConnectionType('NEW_TYPE')`.\n\nSee [Adding a Connection to Your Data Store](https://docs.aws.amazon.com/glue/latest/dg/populate-add-connection.html) and [Connection Structure](https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-connections.html#aws-glue-api-catalog-connections-Connection) documentation for more information on the supported data stores and their configurations.\n\n## SecurityConfiguration\n\nA `SecurityConfiguration` is a set of security properties that can be used by AWS Glue to encrypt data at rest.\n\n```ts\nnew glue.SecurityConfiguration(this, 'MySecurityConfiguration', {\n cloudWatchEncryption: {\n mode: glue.CloudWatchEncryptionMode.KMS,\n },\n jobBookmarksEncryption: {\n mode: glue.JobBookmarksEncryptionMode.CLIENT_SIDE_KMS,\n },\n s3Encryption: {\n mode: glue.S3EncryptionMode.KMS,\n },\n});\n```\n\nBy default, a shared KMS key is created for use with the encryption configurations that require one. You can also supply your own key for each encryption config, for example, for CloudWatch encryption:\n\n```ts\ndeclare const key: kms.Key;\nnew glue.SecurityConfiguration(this, 'MySecurityConfiguration', {\n cloudWatchEncryption: {\n mode: glue.CloudWatchEncryptionMode.KMS,\n kmsKey: key,\n },\n});\n```\n\nSee [documentation](https://docs.aws.amazon.com/glue/latest/dg/encryption-security-configuration.html) for more info for Glue encrypting data written by Crawlers, Jobs, and Development Endpoints.\n\n## Database\n\nA `Database` is a logical grouping of `Tables` in the Glue Catalog.\n\n```ts\nnew glue.Database(this, 'MyDatabase', {\n databaseName: 'my_database',\n description: 'my_database_description',\n});\n```\n\n## Table\n\nA Glue table describes a table of data in S3: its structure (column names and types), location of data (S3 objects with a common prefix in a S3 bucket), and format for the files (Json, Avro, Parquet, etc.):\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }, {\n name: 'col2',\n type: glue.Schema.array(glue.Schema.STRING),\n comment: 'col2 is an array of strings' // comment is optional\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\nBy default, a S3 bucket will be created to store the table's data but you can manually pass the `bucket` and `s3Prefix`:\n\n```ts\ndeclare const myBucket: s3.Bucket;\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n bucket: myBucket,\n s3Prefix: 'my-table/',\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\nGlue tables can be configured to contain user-defined properties, to describe the physical storage of table data, through the `storageParameters` property:\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n storageParameters: [\n glue.StorageParameter.skipHeaderLineCount(1),\n glue.StorageParameter.compressionType(glue.CompressionType.GZIP),\n glue.StorageParameter.custom('separatorChar', ',')\n ],\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\nGlue tables can also be configured to contain user-defined table properties through the [`parameters`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-parameters) property:\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n parameters: {\n key1: 'val1',\n key2: 'val2',\n },\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n### Partition Keys\n\nTo improve query performance, a table can specify `partitionKeys` on which data is stored and queried separately. For example, you might partition a table by `year` and `month` to optimize queries based on a time window:\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n partitionKeys: [{\n name: 'year',\n type: glue.Schema.SMALL_INT,\n }, {\n name: 'month',\n type: glue.Schema.SMALL_INT,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n### Partition Indexes\n\nAnother way to improve query performance is to specify partition indexes. If no partition indexes are\npresent on the table, AWS Glue loads all partitions of the table and filters the loaded partitions using\nthe query expression. The query takes more time to run as the number of partitions increase. With an\nindex, the query will try to fetch a subset of the partitions instead of loading all partitions of the\ntable.\n\nThe keys of a partition index must be a subset of the partition keys of the table. You can have a\nmaximum of 3 partition indexes per table. To specify a partition index, you can use the `partitionIndexes`\nproperty:\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n partitionKeys: [{\n name: 'year',\n type: glue.Schema.SMALL_INT,\n }, {\n name: 'month',\n type: glue.Schema.SMALL_INT,\n }],\n partitionIndexes: [{\n indexName: 'my-index', // optional\n keyNames: ['year'],\n }], // supply up to 3 indexes\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\nAlternatively, you can call the `addPartitionIndex()` function on a table:\n\n```ts\ndeclare const myTable: glue.Table;\nmyTable.addPartitionIndex({\n indexName: 'my-index',\n keyNames: ['year'],\n});\n```\n\n### Partition Filtering\n\nIf you have a table with a large number of partitions that grows over time, consider using AWS Glue partition indexing and filtering.\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n partitionKeys: [{\n name: 'year',\n type: glue.Schema.SMALL_INT,\n }, {\n name: 'month',\n type: glue.Schema.SMALL_INT,\n }],\n dataFormat: glue.DataFormat.JSON,\n enablePartitionFiltering: true,\n});\n```\n\n### Glue Connections\n\nGlue connections allow external data connections to third party databases and data warehouses. However, these connections can also be assigned to Glue Tables, allowing you to query external data sources using the Glue Data Catalog.\n\nWhereas `S3Table` will point to (and if needed, create) a bucket to store the tables' data, `ExternalTable` will point to an existing table in a data source. For example, to create a table in Glue that points to a table in Redshift:\n\n```ts\ndeclare const myConnection: glue.Connection;\ndeclare const myDatabase: glue.Database;\nnew glue.ExternalTable(this, 'MyTable', {\n connection: myConnection,\n externalDataLocation: 'default_db_public_example', // A table in Redshift\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n## [Encryption](https://docs.aws.amazon.com/athena/latest/ug/encryption.html)\n\nYou can enable encryption on a Table's data:\n\n* [S3Managed](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html) - (default) Server side encryption (`SSE-S3`) with an Amazon S3-managed key.\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n encryption: glue.TableEncryption.S3_MANAGED,\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n* [Kms](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) - Server-side encryption (`SSE-KMS`) with an AWS KMS Key managed by the account owner.\n\n```ts\ndeclare const myDatabase: glue.Database;\n// KMS key is created automatically\nnew glue.S3Table(this, 'MyTable', {\n encryption: glue.TableEncryption.KMS,\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n\n// with an explicit KMS key\nnew glue.S3Table(this, 'MyTable', {\n encryption: glue.TableEncryption.KMS,\n encryptionKey: new kms.Key(this, 'MyKey'),\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n* [KmsManaged](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) - Server-side encryption (`SSE-KMS`), like `Kms`, except with an AWS KMS Key managed by the AWS Key Management Service.\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n encryption: glue.TableEncryption.KMS_MANAGED,\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n* [ClientSideKms](https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html#client-side-encryption-kms-managed-master-key-intro) - Client-side encryption (`CSE-KMS`) with an AWS KMS Key managed by the account owner.\n\n```ts\ndeclare const myDatabase: glue.Database;\n// KMS key is created automatically\nnew glue.S3Table(this, 'MyTable', {\n encryption: glue.TableEncryption.CLIENT_SIDE_KMS,\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n\n// with an explicit KMS key\nnew glue.S3Table(this, 'MyTable', {\n encryption: glue.TableEncryption.CLIENT_SIDE_KMS,\n encryptionKey: new kms.Key(this, 'MyKey'),\n // ...\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n*Note: you cannot provide a `Bucket` when creating the `S3Table` if you wish to use server-side encryption (`KMS`, `KMS_MANAGED` or `S3_MANAGED`)*.\n\n## Types\n\nA table's schema is a collection of columns, each of which have a `name` and a `type`. Types are recursive structures, consisting of primitive and complex types:\n\n```ts\ndeclare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n columns: [{\n name: 'primitive_column',\n type: glue.Schema.STRING,\n }, {\n name: 'array_column',\n type: glue.Schema.array(glue.Schema.INTEGER),\n comment: 'array<integer>',\n }, {\n name: 'map_column',\n type: glue.Schema.map(\n glue.Schema.STRING,\n glue.Schema.TIMESTAMP),\n comment: 'map<string,string>',\n }, {\n name: 'struct_column',\n type: glue.Schema.struct([{\n name: 'nested_column',\n type: glue.Schema.DATE,\n comment: 'nested comment',\n }]),\n comment: \"struct<nested_column:date COMMENT 'nested comment'>\",\n }],\n // ...\n database: myDatabase,\n dataFormat: glue.DataFormat.JSON,\n});\n```\n\n### Primitives\n\n#### Numeric\n\n| Name \t| Type \t| Comments |\n|-----------\t|----------\t|------------------------------------------------------------------------------------------------------------------\t|\n| FLOAT \t| Constant \t| A 32-bit single-precision floating point number |\n| INTEGER \t| Constant \t| A 32-bit signed value in two's complement format, with a minimum value of -2^31 and a maximum value of 2^31-1 \t|\n| DOUBLE \t| Constant \t| A 64-bit double-precision floating point number |\n| BIG_INT \t| Constant \t| A 64-bit signed INTEGER in two’s complement format, with a minimum value of -2^63 and a maximum value of 2^63 -1 |\n| SMALL_INT \t| Constant \t| A 16-bit signed INTEGER in two’s complement format, with a minimum value of -2^15 and a maximum value of 2^15-1 |\n| TINY_INT \t| Constant \t| A 8-bit signed INTEGER in two’s complement format, with a minimum value of -2^7 and a maximum value of 2^7-1 |\n\n#### Date and time\n\n| Name \t| Type \t| Comments \t|\n|-----------\t|----------\t|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------\t|\n| DATE \t| Constant \t| A date in UNIX format, such as YYYY-MM-DD. \t|\n| TIMESTAMP \t| Constant \t| Date and time instant in the UNiX format, such as yyyy-mm-dd hh:mm:ss[.f...]. For example, TIMESTAMP '2008-09-15 03:04:05.324'. This format uses the session time zone. \t|\n\n#### String\n\n| Name \t| Type \t| Comments \t|\n|--------------------------------------------\t|----------\t|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\t|\n| STRING \t| Constant \t| A string literal enclosed in single or double quotes \t|\n| decimal(precision: number, scale?: number) \t| Function \t| `precision` is the total number of digits. `scale` (optional) is the number of digits in fractional part with a default of 0. For example, use these type definitions: decimal(11,5), decimal(15) \t|\n| char(length: number) \t| Function \t| Fixed length character data, with a specified length between 1 and 255, such as char(10) \t|\n| varchar(length: number) \t| Function \t| Variable length character data, with a specified length between 1 and 65535, such as varchar(10) \t|\n\n#### Miscellaneous\n\n| Name \t| Type \t| Comments \t|\n|---------\t|----------\t|-------------------------------\t|\n| BOOLEAN \t| Constant \t| Values are `true` and `false` \t|\n| BINARY \t| Constant \t| Value is in binary \t|\n\n### Complex\n\n| Name \t| Type \t| Comments \t|\n|-------------------------------------\t|----------\t|-------------------------------------------------------------------\t|\n| array(itemType: Type) \t| Function \t| An array of some other type \t|\n| map(keyType: Type, valueType: Type) \t| Function \t| A map of some primitive key type to any value type \t|\n| struct(collumns: Column[]) \t| Function \t| Nested structure containing individually named and typed collumns \t|\n\n## Data Quality Ruleset\n\nA `DataQualityRuleset` specifies a data quality ruleset with DQDL rules applied to a specified AWS Glue table. For example, to create a data quality ruleset for a given table:\n\n```ts\nnew glue.DataQualityRuleset(this, 'MyDataQualityRuleset', {\n clientToken: 'client_token',\n description: 'description',\n rulesetName: 'ruleset_name',\n rulesetDqdl: 'ruleset_dqdl',\n tags: {\n key1: 'value1',\n key2: 'value2',\n },\n targetTable: new glue.DataQualityTargetTable('database_name', 'table_name'),\n});\n```\n\nFor more information, see [AWS Glue Data Quality](https://docs.aws.amazon.com/glue/latest/dg/glue-data-quality.html).\n"
|
|
3662
3662
|
},
|
|
3663
3663
|
"repository": {
|
|
3664
3664
|
"directory": "packages/@aws-cdk/aws-glue-alpha",
|
|
@@ -5750,7 +5750,7 @@
|
|
|
5750
5750
|
},
|
|
5751
5751
|
"locationInModule": {
|
|
5752
5752
|
"filename": "lib/database.ts",
|
|
5753
|
-
"line":
|
|
5753
|
+
"line": 98
|
|
5754
5754
|
},
|
|
5755
5755
|
"parameters": [
|
|
5756
5756
|
{
|
|
@@ -5780,7 +5780,7 @@
|
|
|
5780
5780
|
"kind": "class",
|
|
5781
5781
|
"locationInModule": {
|
|
5782
5782
|
"filename": "lib/database.ts",
|
|
5783
|
-
"line":
|
|
5783
|
+
"line": 58
|
|
5784
5784
|
},
|
|
5785
5785
|
"methods": [
|
|
5786
5786
|
{
|
|
@@ -5789,7 +5789,7 @@
|
|
|
5789
5789
|
},
|
|
5790
5790
|
"locationInModule": {
|
|
5791
5791
|
"filename": "lib/database.ts",
|
|
5792
|
-
"line":
|
|
5792
|
+
"line": 60
|
|
5793
5793
|
},
|
|
5794
5794
|
"name": "fromDatabaseArn",
|
|
5795
5795
|
"parameters": [
|
|
@@ -5830,7 +5830,7 @@
|
|
|
5830
5830
|
"immutable": true,
|
|
5831
5831
|
"locationInModule": {
|
|
5832
5832
|
"filename": "lib/database.ts",
|
|
5833
|
-
"line":
|
|
5833
|
+
"line": 76
|
|
5834
5834
|
},
|
|
5835
5835
|
"name": "catalogArn",
|
|
5836
5836
|
"overrides": "@aws-cdk/aws-glue-alpha.IDatabase",
|
|
@@ -5846,7 +5846,7 @@
|
|
|
5846
5846
|
"immutable": true,
|
|
5847
5847
|
"locationInModule": {
|
|
5848
5848
|
"filename": "lib/database.ts",
|
|
5849
|
-
"line":
|
|
5849
|
+
"line": 81
|
|
5850
5850
|
},
|
|
5851
5851
|
"name": "catalogId",
|
|
5852
5852
|
"overrides": "@aws-cdk/aws-glue-alpha.IDatabase",
|
|
@@ -5862,7 +5862,7 @@
|
|
|
5862
5862
|
"immutable": true,
|
|
5863
5863
|
"locationInModule": {
|
|
5864
5864
|
"filename": "lib/database.ts",
|
|
5865
|
-
"line":
|
|
5865
|
+
"line": 86
|
|
5866
5866
|
},
|
|
5867
5867
|
"name": "databaseArn",
|
|
5868
5868
|
"overrides": "@aws-cdk/aws-glue-alpha.IDatabase",
|
|
@@ -5878,7 +5878,7 @@
|
|
|
5878
5878
|
"immutable": true,
|
|
5879
5879
|
"locationInModule": {
|
|
5880
5880
|
"filename": "lib/database.ts",
|
|
5881
|
-
"line":
|
|
5881
|
+
"line": 91
|
|
5882
5882
|
},
|
|
5883
5883
|
"name": "databaseName",
|
|
5884
5884
|
"overrides": "@aws-cdk/aws-glue-alpha.IDatabase",
|
|
@@ -5894,7 +5894,7 @@
|
|
|
5894
5894
|
"immutable": true,
|
|
5895
5895
|
"locationInModule": {
|
|
5896
5896
|
"filename": "lib/database.ts",
|
|
5897
|
-
"line":
|
|
5897
|
+
"line": 96
|
|
5898
5898
|
},
|
|
5899
5899
|
"name": "locationUri",
|
|
5900
5900
|
"optional": true,
|
|
@@ -5910,9 +5910,9 @@
|
|
|
5910
5910
|
"datatype": true,
|
|
5911
5911
|
"docs": {
|
|
5912
5912
|
"stability": "experimental",
|
|
5913
|
-
"example": "
|
|
5913
|
+
"example": "new glue.Database(this, 'MyDatabase', {\n databaseName: 'my_database',\n description: 'my_database_description',\n});",
|
|
5914
5914
|
"custom": {
|
|
5915
|
-
"exampleMetadata": "
|
|
5915
|
+
"exampleMetadata": "infused"
|
|
5916
5916
|
}
|
|
5917
5917
|
},
|
|
5918
5918
|
"fqn": "@aws-cdk/aws-glue-alpha.DatabaseProps",
|
|
@@ -5941,6 +5941,24 @@
|
|
|
5941
5941
|
"primitive": "string"
|
|
5942
5942
|
}
|
|
5943
5943
|
},
|
|
5944
|
+
{
|
|
5945
|
+
"abstract": true,
|
|
5946
|
+
"docs": {
|
|
5947
|
+
"default": "- no database description",
|
|
5948
|
+
"stability": "experimental",
|
|
5949
|
+
"summary": "A description of the database."
|
|
5950
|
+
},
|
|
5951
|
+
"immutable": true,
|
|
5952
|
+
"locationInModule": {
|
|
5953
|
+
"filename": "lib/database.ts",
|
|
5954
|
+
"line": 52
|
|
5955
|
+
},
|
|
5956
|
+
"name": "description",
|
|
5957
|
+
"optional": true,
|
|
5958
|
+
"type": {
|
|
5959
|
+
"primitive": "string"
|
|
5960
|
+
}
|
|
5961
|
+
},
|
|
5944
5962
|
{
|
|
5945
5963
|
"abstract": true,
|
|
5946
5964
|
"docs": {
|
|
@@ -6050,7 +6068,7 @@
|
|
|
6050
6068
|
},
|
|
6051
6069
|
"locationInModule": {
|
|
6052
6070
|
"filename": "lib/external-table.ts",
|
|
6053
|
-
"line":
|
|
6071
|
+
"line": 118
|
|
6054
6072
|
},
|
|
6055
6073
|
"name": "grantRead",
|
|
6056
6074
|
"overrides": "@aws-cdk/aws-glue-alpha.TableBase",
|
|
@@ -6078,7 +6096,7 @@
|
|
|
6078
6096
|
},
|
|
6079
6097
|
"locationInModule": {
|
|
6080
6098
|
"filename": "lib/external-table.ts",
|
|
6081
|
-
"line":
|
|
6099
|
+
"line": 138
|
|
6082
6100
|
},
|
|
6083
6101
|
"name": "grantReadWrite",
|
|
6084
6102
|
"overrides": "@aws-cdk/aws-glue-alpha.TableBase",
|
|
@@ -6106,7 +6124,7 @@
|
|
|
6106
6124
|
},
|
|
6107
6125
|
"locationInModule": {
|
|
6108
6126
|
"filename": "lib/external-table.ts",
|
|
6109
|
-
"line":
|
|
6127
|
+
"line": 128
|
|
6110
6128
|
},
|
|
6111
6129
|
"name": "grantWrite",
|
|
6112
6130
|
"overrides": "@aws-cdk/aws-glue-alpha.TableBase",
|
|
@@ -10087,7 +10105,7 @@
|
|
|
10087
10105
|
},
|
|
10088
10106
|
"stability": "experimental",
|
|
10089
10107
|
"summary": "A Glue table that targets a S3 dataset.",
|
|
10090
|
-
"example": "declare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n
|
|
10108
|
+
"example": "declare const myDatabase: glue.Database;\nnew glue.S3Table(this, 'MyTable', {\n database: myDatabase,\n columns: [{\n name: 'col1',\n type: glue.Schema.STRING,\n }],\n partitionKeys: [{\n name: 'year',\n type: glue.Schema.SMALL_INT,\n }, {\n name: 'month',\n type: glue.Schema.SMALL_INT,\n }],\n dataFormat: glue.DataFormat.JSON,\n enablePartitionFiltering: true,\n});"
|
|
10091
10109
|
},
|
|
10092
10110
|
"fqn": "@aws-cdk/aws-glue-alpha.S3Table",
|
|
10093
10111
|
"initializer": {
|
|
@@ -10131,7 +10149,7 @@
|
|
|
10131
10149
|
},
|
|
10132
10150
|
"locationInModule": {
|
|
10133
10151
|
"filename": "lib/s3-table.ts",
|
|
10134
|
-
"line":
|
|
10152
|
+
"line": 221
|
|
10135
10153
|
},
|
|
10136
10154
|
"name": "generateS3PrefixForGrant",
|
|
10137
10155
|
"protected": true,
|
|
@@ -10148,7 +10166,7 @@
|
|
|
10148
10166
|
},
|
|
10149
10167
|
"locationInModule": {
|
|
10150
10168
|
"filename": "lib/s3-table.ts",
|
|
10151
|
-
"line":
|
|
10169
|
+
"line": 190
|
|
10152
10170
|
},
|
|
10153
10171
|
"name": "grantRead",
|
|
10154
10172
|
"overrides": "@aws-cdk/aws-glue-alpha.TableBase",
|
|
@@ -10176,7 +10194,7 @@
|
|
|
10176
10194
|
},
|
|
10177
10195
|
"locationInModule": {
|
|
10178
10196
|
"filename": "lib/s3-table.ts",
|
|
10179
|
-
"line":
|
|
10197
|
+
"line": 214
|
|
10180
10198
|
},
|
|
10181
10199
|
"name": "grantReadWrite",
|
|
10182
10200
|
"overrides": "@aws-cdk/aws-glue-alpha.TableBase",
|
|
@@ -10204,7 +10222,7 @@
|
|
|
10204
10222
|
},
|
|
10205
10223
|
"locationInModule": {
|
|
10206
10224
|
"filename": "lib/s3-table.ts",
|
|
10207
|
-
"line":
|
|
10225
|
+
"line": 202
|
|
10208
10226
|
},
|
|
10209
10227
|
"name": "grantWrite",
|
|
10210
10228
|
"overrides": "@aws-cdk/aws-glue-alpha.TableBase",
|
|
@@ -12506,7 +12524,7 @@
|
|
|
12506
12524
|
},
|
|
12507
12525
|
"locationInModule": {
|
|
12508
12526
|
"filename": "lib/table-base.ts",
|
|
12509
|
-
"line":
|
|
12527
|
+
"line": 240
|
|
12510
12528
|
},
|
|
12511
12529
|
"parameters": [
|
|
12512
12530
|
{
|
|
@@ -12535,7 +12553,7 @@
|
|
|
12535
12553
|
"kind": "class",
|
|
12536
12554
|
"locationInModule": {
|
|
12537
12555
|
"filename": "lib/table-base.ts",
|
|
12538
|
-
"line":
|
|
12556
|
+
"line": 165
|
|
12539
12557
|
},
|
|
12540
12558
|
"methods": [
|
|
12541
12559
|
{
|
|
@@ -12544,7 +12562,7 @@
|
|
|
12544
12562
|
},
|
|
12545
12563
|
"locationInModule": {
|
|
12546
12564
|
"filename": "lib/table-base.ts",
|
|
12547
|
-
"line":
|
|
12565
|
+
"line": 167
|
|
12548
12566
|
},
|
|
12549
12567
|
"name": "fromTableArn",
|
|
12550
12568
|
"parameters": [
|
|
@@ -12581,7 +12599,7 @@
|
|
|
12581
12599
|
},
|
|
12582
12600
|
"locationInModule": {
|
|
12583
12601
|
"filename": "lib/table-base.ts",
|
|
12584
|
-
"line":
|
|
12602
|
+
"line": 183
|
|
12585
12603
|
},
|
|
12586
12604
|
"name": "fromTableAttributes",
|
|
12587
12605
|
"parameters": [
|
|
@@ -12629,7 +12647,7 @@
|
|
|
12629
12647
|
},
|
|
12630
12648
|
"locationInModule": {
|
|
12631
12649
|
"filename": "lib/table-base.ts",
|
|
12632
|
-
"line":
|
|
12650
|
+
"line": 271
|
|
12633
12651
|
},
|
|
12634
12652
|
"name": "addPartitionIndex",
|
|
12635
12653
|
"parameters": [
|
|
@@ -12648,7 +12666,7 @@
|
|
|
12648
12666
|
},
|
|
12649
12667
|
"locationInModule": {
|
|
12650
12668
|
"filename": "lib/table-base.ts",
|
|
12651
|
-
"line":
|
|
12669
|
+
"line": 334
|
|
12652
12670
|
},
|
|
12653
12671
|
"name": "grant",
|
|
12654
12672
|
"parameters": [
|
|
@@ -12683,7 +12701,7 @@
|
|
|
12683
12701
|
},
|
|
12684
12702
|
"locationInModule": {
|
|
12685
12703
|
"filename": "lib/table-base.ts",
|
|
12686
|
-
"line":
|
|
12704
|
+
"line": 260
|
|
12687
12705
|
},
|
|
12688
12706
|
"name": "grantRead",
|
|
12689
12707
|
"parameters": [
|
|
@@ -12707,7 +12725,7 @@
|
|
|
12707
12725
|
},
|
|
12708
12726
|
"locationInModule": {
|
|
12709
12727
|
"filename": "lib/table-base.ts",
|
|
12710
|
-
"line":
|
|
12728
|
+
"line": 262
|
|
12711
12729
|
},
|
|
12712
12730
|
"name": "grantReadWrite",
|
|
12713
12731
|
"parameters": [
|
|
@@ -12732,7 +12750,7 @@
|
|
|
12732
12750
|
},
|
|
12733
12751
|
"locationInModule": {
|
|
12734
12752
|
"filename": "lib/table-base.ts",
|
|
12735
|
-
"line":
|
|
12753
|
+
"line": 346
|
|
12736
12754
|
},
|
|
12737
12755
|
"name": "grantToUnderlyingResources",
|
|
12738
12756
|
"parameters": [
|
|
@@ -12767,7 +12785,7 @@
|
|
|
12767
12785
|
},
|
|
12768
12786
|
"locationInModule": {
|
|
12769
12787
|
"filename": "lib/table-base.ts",
|
|
12770
|
-
"line":
|
|
12788
|
+
"line": 261
|
|
12771
12789
|
},
|
|
12772
12790
|
"name": "grantWrite",
|
|
12773
12791
|
"parameters": [
|
|
@@ -12795,7 +12813,7 @@
|
|
|
12795
12813
|
"immutable": true,
|
|
12796
12814
|
"locationInModule": {
|
|
12797
12815
|
"filename": "lib/table-base.ts",
|
|
12798
|
-
"line":
|
|
12816
|
+
"line": 215
|
|
12799
12817
|
},
|
|
12800
12818
|
"name": "columns",
|
|
12801
12819
|
"type": {
|
|
@@ -12815,7 +12833,7 @@
|
|
|
12815
12833
|
"immutable": true,
|
|
12816
12834
|
"locationInModule": {
|
|
12817
12835
|
"filename": "lib/table-base.ts",
|
|
12818
|
-
"line":
|
|
12836
|
+
"line": 205
|
|
12819
12837
|
},
|
|
12820
12838
|
"name": "compressed",
|
|
12821
12839
|
"type": {
|
|
@@ -12830,7 +12848,7 @@
|
|
|
12830
12848
|
"immutable": true,
|
|
12831
12849
|
"locationInModule": {
|
|
12832
12850
|
"filename": "lib/table-base.ts",
|
|
12833
|
-
"line":
|
|
12851
|
+
"line": 200
|
|
12834
12852
|
},
|
|
12835
12853
|
"name": "database",
|
|
12836
12854
|
"type": {
|
|
@@ -12845,13 +12863,35 @@
|
|
|
12845
12863
|
"immutable": true,
|
|
12846
12864
|
"locationInModule": {
|
|
12847
12865
|
"filename": "lib/table-base.ts",
|
|
12848
|
-
"line":
|
|
12866
|
+
"line": 210
|
|
12849
12867
|
},
|
|
12850
12868
|
"name": "dataFormat",
|
|
12851
12869
|
"type": {
|
|
12852
12870
|
"fqn": "@aws-cdk/aws-glue-alpha.DataFormat"
|
|
12853
12871
|
}
|
|
12854
12872
|
},
|
|
12873
|
+
{
|
|
12874
|
+
"docs": {
|
|
12875
|
+
"see": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-parameters",
|
|
12876
|
+
"stability": "experimental",
|
|
12877
|
+
"summary": "The tables' properties associated with the table."
|
|
12878
|
+
},
|
|
12879
|
+
"immutable": true,
|
|
12880
|
+
"locationInModule": {
|
|
12881
|
+
"filename": "lib/table-base.ts",
|
|
12882
|
+
"line": 231
|
|
12883
|
+
},
|
|
12884
|
+
"name": "parameters",
|
|
12885
|
+
"protected": true,
|
|
12886
|
+
"type": {
|
|
12887
|
+
"collection": {
|
|
12888
|
+
"elementtype": {
|
|
12889
|
+
"primitive": "string"
|
|
12890
|
+
},
|
|
12891
|
+
"kind": "map"
|
|
12892
|
+
}
|
|
12893
|
+
}
|
|
12894
|
+
},
|
|
12855
12895
|
{
|
|
12856
12896
|
"abstract": true,
|
|
12857
12897
|
"docs": {
|
|
@@ -12860,7 +12900,7 @@
|
|
|
12860
12900
|
"immutable": true,
|
|
12861
12901
|
"locationInModule": {
|
|
12862
12902
|
"filename": "lib/table-base.ts",
|
|
12863
|
-
"line":
|
|
12903
|
+
"line": 194
|
|
12864
12904
|
},
|
|
12865
12905
|
"name": "tableArn",
|
|
12866
12906
|
"overrides": "@aws-cdk/aws-glue-alpha.ITable",
|
|
@@ -12876,7 +12916,7 @@
|
|
|
12876
12916
|
"immutable": true,
|
|
12877
12917
|
"locationInModule": {
|
|
12878
12918
|
"filename": "lib/table-base.ts",
|
|
12879
|
-
"line":
|
|
12919
|
+
"line": 193
|
|
12880
12920
|
},
|
|
12881
12921
|
"name": "tableName",
|
|
12882
12922
|
"overrides": "@aws-cdk/aws-glue-alpha.ITable",
|
|
@@ -12892,7 +12932,7 @@
|
|
|
12892
12932
|
"immutable": true,
|
|
12893
12933
|
"locationInModule": {
|
|
12894
12934
|
"filename": "lib/table-base.ts",
|
|
12895
|
-
"line":
|
|
12935
|
+
"line": 192
|
|
12896
12936
|
},
|
|
12897
12937
|
"name": "tableResource",
|
|
12898
12938
|
"protected": true,
|
|
@@ -12908,7 +12948,7 @@
|
|
|
12908
12948
|
"immutable": true,
|
|
12909
12949
|
"locationInModule": {
|
|
12910
12950
|
"filename": "lib/table-base.ts",
|
|
12911
|
-
"line":
|
|
12951
|
+
"line": 195
|
|
12912
12952
|
},
|
|
12913
12953
|
"name": "partitionIndexes",
|
|
12914
12954
|
"optional": true,
|
|
@@ -12929,7 +12969,7 @@
|
|
|
12929
12969
|
"immutable": true,
|
|
12930
12970
|
"locationInModule": {
|
|
12931
12971
|
"filename": "lib/table-base.ts",
|
|
12932
|
-
"line":
|
|
12972
|
+
"line": 220
|
|
12933
12973
|
},
|
|
12934
12974
|
"name": "partitionKeys",
|
|
12935
12975
|
"optional": true,
|
|
@@ -12950,7 +12990,7 @@
|
|
|
12950
12990
|
"immutable": true,
|
|
12951
12991
|
"locationInModule": {
|
|
12952
12992
|
"filename": "lib/table-base.ts",
|
|
12953
|
-
"line":
|
|
12993
|
+
"line": 225
|
|
12954
12994
|
},
|
|
12955
12995
|
"name": "storageParameters",
|
|
12956
12996
|
"optional": true,
|
|
@@ -12971,7 +13011,7 @@
|
|
|
12971
13011
|
"datatype": true,
|
|
12972
13012
|
"docs": {
|
|
12973
13013
|
"stability": "experimental",
|
|
12974
|
-
"example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as glue_alpha from '@aws-cdk/aws-glue-alpha';\n\ndeclare const database: glue_alpha.Database;\ndeclare const dataFormat: glue_alpha.DataFormat;\ndeclare const storageParameter: glue_alpha.StorageParameter;\nconst tableBaseProps: glue_alpha.TableBaseProps = {\n columns: [{\n name: 'name',\n type: {\n inputString: 'inputString',\n isPrimitive: false,\n },\n\n // the properties below are optional\n comment: 'comment',\n }],\n database: database,\n dataFormat: dataFormat,\n\n // the properties below are optional\n compressed: false,\n description: 'description',\n enablePartitionFiltering: false,\n partitionIndexes: [{\n keyNames: ['keyNames'],\n\n // the properties below are optional\n indexName: 'indexName',\n }],\n partitionKeys: [{\n name: 'name',\n type: {\n inputString: 'inputString',\n isPrimitive: false,\n },\n\n // the properties below are optional\n comment: 'comment',\n }],\n storageParameters: [storageParameter],\n storedAsSubDirectories: false,\n tableName: 'tableName',\n};",
|
|
13014
|
+
"example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as glue_alpha from '@aws-cdk/aws-glue-alpha';\n\ndeclare const database: glue_alpha.Database;\ndeclare const dataFormat: glue_alpha.DataFormat;\ndeclare const storageParameter: glue_alpha.StorageParameter;\nconst tableBaseProps: glue_alpha.TableBaseProps = {\n columns: [{\n name: 'name',\n type: {\n inputString: 'inputString',\n isPrimitive: false,\n },\n\n // the properties below are optional\n comment: 'comment',\n }],\n database: database,\n dataFormat: dataFormat,\n\n // the properties below are optional\n compressed: false,\n description: 'description',\n enablePartitionFiltering: false,\n parameters: {\n parametersKey: 'parameters',\n },\n partitionIndexes: [{\n keyNames: ['keyNames'],\n\n // the properties below are optional\n indexName: 'indexName',\n }],\n partitionKeys: [{\n name: 'name',\n type: {\n inputString: 'inputString',\n isPrimitive: false,\n },\n\n // the properties below are optional\n comment: 'comment',\n }],\n storageParameters: [storageParameter],\n storedAsSubDirectories: false,\n tableName: 'tableName',\n};",
|
|
12975
13015
|
"custom": {
|
|
12976
13016
|
"exampleMetadata": "fixture=_generated"
|
|
12977
13017
|
}
|
|
@@ -13092,6 +13132,31 @@
|
|
|
13092
13132
|
"primitive": "boolean"
|
|
13093
13133
|
}
|
|
13094
13134
|
},
|
|
13135
|
+
{
|
|
13136
|
+
"abstract": true,
|
|
13137
|
+
"docs": {
|
|
13138
|
+
"default": "- The parameter is not defined",
|
|
13139
|
+
"remarks": "The key/value pairs that are allowed to be submitted are not limited, however their functionality is not guaranteed.",
|
|
13140
|
+
"see": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-parameters",
|
|
13141
|
+
"stability": "experimental",
|
|
13142
|
+
"summary": "The key/value pairs define properties associated with the table."
|
|
13143
|
+
},
|
|
13144
|
+
"immutable": true,
|
|
13145
|
+
"locationInModule": {
|
|
13146
|
+
"filename": "lib/table-base.ts",
|
|
13147
|
+
"line": 159
|
|
13148
|
+
},
|
|
13149
|
+
"name": "parameters",
|
|
13150
|
+
"optional": true,
|
|
13151
|
+
"type": {
|
|
13152
|
+
"collection": {
|
|
13153
|
+
"elementtype": {
|
|
13154
|
+
"primitive": "string"
|
|
13155
|
+
},
|
|
13156
|
+
"kind": "map"
|
|
13157
|
+
}
|
|
13158
|
+
}
|
|
13159
|
+
},
|
|
13095
13160
|
{
|
|
13096
13161
|
"abstract": true,
|
|
13097
13162
|
"docs": {
|
|
@@ -13262,7 +13327,7 @@
|
|
|
13262
13327
|
"datatype": true,
|
|
13263
13328
|
"docs": {
|
|
13264
13329
|
"stability": "experimental",
|
|
13265
|
-
"example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as glue_alpha from '@aws-cdk/aws-glue-alpha';\nimport { aws_kms as kms } from 'aws-cdk-lib';\nimport { aws_s3 as s3 } from 'aws-cdk-lib';\n\ndeclare const bucket: s3.Bucket;\ndeclare const database: glue_alpha.Database;\ndeclare const dataFormat: glue_alpha.DataFormat;\ndeclare const key: kms.Key;\ndeclare const storageParameter: glue_alpha.StorageParameter;\nconst tableProps: glue_alpha.TableProps = {\n columns: [{\n name: 'name',\n type: {\n inputString: 'inputString',\n isPrimitive: false,\n },\n\n // the properties below are optional\n comment: 'comment',\n }],\n database: database,\n dataFormat: dataFormat,\n\n // the properties below are optional\n bucket: bucket,\n compressed: false,\n description: 'description',\n enablePartitionFiltering: false,\n encryption: glue_alpha.TableEncryption.S3_MANAGED,\n encryptionKey: key,\n partitionIndexes: [{\n keyNames: ['keyNames'],\n\n // the properties below are optional\n indexName: 'indexName',\n }],\n partitionKeys: [{\n name: 'name',\n type: {\n inputString: 'inputString',\n isPrimitive: false,\n },\n\n // the properties below are optional\n comment: 'comment',\n }],\n s3Prefix: 's3Prefix',\n storageParameters: [storageParameter],\n storedAsSubDirectories: false,\n tableName: 'tableName',\n};",
|
|
13330
|
+
"example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as glue_alpha from '@aws-cdk/aws-glue-alpha';\nimport { aws_kms as kms } from 'aws-cdk-lib';\nimport { aws_s3 as s3 } from 'aws-cdk-lib';\n\ndeclare const bucket: s3.Bucket;\ndeclare const database: glue_alpha.Database;\ndeclare const dataFormat: glue_alpha.DataFormat;\ndeclare const key: kms.Key;\ndeclare const storageParameter: glue_alpha.StorageParameter;\nconst tableProps: glue_alpha.TableProps = {\n columns: [{\n name: 'name',\n type: {\n inputString: 'inputString',\n isPrimitive: false,\n },\n\n // the properties below are optional\n comment: 'comment',\n }],\n database: database,\n dataFormat: dataFormat,\n\n // the properties below are optional\n bucket: bucket,\n compressed: false,\n description: 'description',\n enablePartitionFiltering: false,\n encryption: glue_alpha.TableEncryption.S3_MANAGED,\n encryptionKey: key,\n parameters: {\n parametersKey: 'parameters',\n },\n partitionIndexes: [{\n keyNames: ['keyNames'],\n\n // the properties below are optional\n indexName: 'indexName',\n }],\n partitionKeys: [{\n name: 'name',\n type: {\n inputString: 'inputString',\n isPrimitive: false,\n },\n\n // the properties below are optional\n comment: 'comment',\n }],\n s3Prefix: 's3Prefix',\n storageParameters: [storageParameter],\n storedAsSubDirectories: false,\n tableName: 'tableName',\n};",
|
|
13266
13331
|
"custom": {
|
|
13267
13332
|
"exampleMetadata": "fixture=_generated"
|
|
13268
13333
|
}
|
|
@@ -13558,6 +13623,6 @@
|
|
|
13558
13623
|
"symbolId": "lib/storage-parameter:WriteParallel"
|
|
13559
13624
|
}
|
|
13560
13625
|
},
|
|
13561
|
-
"version": "2.
|
|
13626
|
+
"version": "2.118.0-alpha.0",
|
|
13562
13627
|
"fingerprint": "**********"
|
|
13563
13628
|
}
|
package/.jsii.tabl.json.gz
CHANGED
|
Binary file
|
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright 2018-
|
|
189
|
+
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/NOTICE
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
AWS Cloud Development Kit (AWS CDK)
|
|
2
|
-
Copyright 2018-
|
|
2
|
+
Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
package/README.md
CHANGED
|
@@ -202,7 +202,10 @@ See [documentation](https://docs.aws.amazon.com/glue/latest/dg/encryption-securi
|
|
|
202
202
|
A `Database` is a logical grouping of `Tables` in the Glue Catalog.
|
|
203
203
|
|
|
204
204
|
```ts
|
|
205
|
-
new glue.Database(this, 'MyDatabase'
|
|
205
|
+
new glue.Database(this, 'MyDatabase', {
|
|
206
|
+
databaseName: 'my_database',
|
|
207
|
+
description: 'my_database_description',
|
|
208
|
+
});
|
|
206
209
|
```
|
|
207
210
|
|
|
208
211
|
## Table
|
|
@@ -263,6 +266,24 @@ new glue.S3Table(this, 'MyTable', {
|
|
|
263
266
|
});
|
|
264
267
|
```
|
|
265
268
|
|
|
269
|
+
Glue tables can also be configured to contain user-defined table properties through the [`parameters`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-table-tableinput.html#cfn-glue-table-tableinput-parameters) property:
|
|
270
|
+
|
|
271
|
+
```ts
|
|
272
|
+
declare const myDatabase: glue.Database;
|
|
273
|
+
new glue.S3Table(this, 'MyTable', {
|
|
274
|
+
parameters: {
|
|
275
|
+
key1: 'val1',
|
|
276
|
+
key2: 'val2',
|
|
277
|
+
},
|
|
278
|
+
database: myDatabase,
|
|
279
|
+
columns: [{
|
|
280
|
+
name: 'col1',
|
|
281
|
+
type: glue.Schema.STRING,
|
|
282
|
+
}],
|
|
283
|
+
dataFormat: glue.DataFormat.JSON,
|
|
284
|
+
});
|
|
285
|
+
```
|
|
286
|
+
|
|
266
287
|
### Partition Keys
|
|
267
288
|
|
|
268
289
|
To improve query performance, a table can specify `partitionKeys` on which data is stored and queried separately. For example, you might partition a table by `year` and `month` to optimize queries based on a time window:
|