cdk-glue-iceberg-table 0.15.1 → 0.17.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 +954 -100
- package/README.md +145 -15
- package/dist/lib/iceberg/iceberg-partition-transform.js +1 -1
- package/dist/lib/iceberg/iceberg-schema-history.d.ts +117 -0
- package/dist/lib/iceberg/iceberg-schema-history.js +485 -0
- package/dist/lib/iceberg/iceberg-table-grants.d.ts +61 -28
- package/dist/lib/iceberg/iceberg-table-grants.js +120 -32
- package/dist/lib/iceberg/iceberg-table-properties.js +1 -1
- package/dist/lib/iceberg/iceberg-table-render.d.ts +8 -1
- package/dist/lib/iceberg/iceberg-table-render.js +45 -30
- package/dist/lib/iceberg/iceberg-table.d.ts +32 -12
- package/dist/lib/iceberg/iceberg-table.js +32 -113
- package/dist/lib/iceberg/iceberg-type.d.ts +6 -0
- package/dist/lib/iceberg/iceberg-type.js +40 -26
- package/dist/lib/iceberg/index.d.ts +2 -0
- package/dist/lib/iceberg/index.js +5 -2
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -9751,7 +9751,7 @@
|
|
|
9751
9751
|
},
|
|
9752
9752
|
"name": "cdk-glue-iceberg-table",
|
|
9753
9753
|
"readme": {
|
|
9754
|
-
"markdown": "# cdk-glue-iceberg-table\n\n[](https://github.com/ksco92/arceus/actions/workflows/ci.yml)\n[](https://codecov.io/gh/ksco92/arceus)\n[](https://www.npmjs.com/package/cdk-glue-iceberg-table)\n[](https://pypi.org/project/cdk-glue-iceberg-table/)\n[](https://constructs.dev/packages/cdk-glue-iceberg-table)\n[](https://www.npmjs.com/package/cdk-glue-iceberg-table)\n[](https://github.com/ksco92/arceus/blob/main/LICENSE)\n\n**`cdk-glue-iceberg-table` is an AWS CDK L2 construct to create and\nevolve Apache Iceberg tables in the AWS Glue Data Catalog — schema and\npartition changes that survive CloudFormation updates, via cdk\ndeploy.** It supports Iceberg format version 3 (`variant`, nanosecond\ntimestamps, `geometry` / `geography`, `unknown`). It emits the exact\n`AWS::Glue::Table` / `OpenTableFormatInput` shape, so a single `cdk\ndeploy` creates, evolves, and destroys a table like any other CDK\nresource. No custom resource, no Lambda, no \"`cdk deploy` and then run\nthis SQL by hand\" two-step. Table changes (new columns, renames, drops,\nnew partition fields) land as a reviewed diff in a pull request and\napply through `cdk deploy`.\n\nStatus (October 2026): published on npm (TypeScript/JavaScript) and\nPyPI (Python), pre-1.0, with a public surface guarded on every PR by two\nconsumer jobs (`e2e-consumer` compiles and synthesizes an app against a\npinned published version, `packed-consumer` does the same against the PR's\nown `npm pack` tarball) plus real-AWS integration suites, including ones\nfor format version 3. The multi-language packages are generated\nfrom one TypeScript source with [jsii](https://aws.github.io/jsii/)\nand indexed on [Construct\nHub](https://constructs.dev/packages/cdk-glue-iceberg-table).\nDeveloped in the [`ksco92/arceus`](https://github.com/ksco92/arceus)\nmonorepo, which also holds a CDK demo app that dogfoods the construct\nagainst a real AWS account.\n\n### Why this exists\n\nAWS documents the CloudFormation shape for Iceberg tables ([AWS Big\nData blog, December 2025](https://aws.amazon.com/blogs/big-data/create-and-update-apache-iceberg-tables-with-partitions-in-the-aws-glue-data-catalog-using-the-aws-sdk-and-aws-cloudformation)),\nbut raw `AWS::Glue::Table` is a minefield: the CREATE succeeds and the\n*first* `Update` silently strips `table_type=ICEBERG`, after which\nevery Athena query fails with `HIVE_UNSUPPORTED_FORMAT`. The\nmotivating CDK issue is [aws/aws-cdk#29660](https://github.com/aws/aws-cdk/issues/29660);\n[`manmartgarc`'s comment](https://github.com/aws/aws-cdk/issues/29660#issuecomment-4411359248)\ndocuments the only working shape and the silent-corruption traps you\nhit by getting it slightly wrong. This construct implements that\nshape, refuses to emit the unsafe alternatives, and pins Iceberg field\nIDs (declared [in creation order](#using-icebergtable) for a new\ntable) so schema evolution never orphans existing data. It was the\nbasis of an upstream proposal to land an `IcebergTable` in\n`@aws-cdk/aws-glue-alpha` ([aws/aws-cdk#37988](https://github.com/aws/aws-cdk/pull/37988)),\nclosed unmerged in September 2026.\n\n### How it compares\n\n| Approach | Declarative IaC (in the PR) | In-place schema + partition evolution | Prevents the silent-corruption footguns | Typed API + synth-time validation |\n| --- | --- | --- | --- | --- |\n| Raw `CfnTable` (L1) | ✅ | ⚠️ only if you hand-write the exact `OpenTableFormatInput` shape | ❌ you own both footguns | ❌ |\n| CDK custom resource (Lambda + Glue SDK) | ⚠️ via a custom resource you maintain | ⚠️ you write the diff logic | ⚠️ your code's responsibility | ❌ |\n| Spark SQL DDL, or Athena SQL DDL, at job runtime | ❌ imperative, outside the PR | ✅ but outside CloudFormation | n/a | ❌ |\n| **`cdk-glue-iceberg-table`** | ✅ | ✅ via `cdk deploy` | ✅ both prevented by construction | ✅ |\n\n## Install\n\nTypeScript / JavaScript (npm):\n\n```bash\nnpm install cdk-glue-iceberg-table\n```\n\nPython (PyPI):\n\n```bash\npip install cdk-glue-iceberg-table\n```\n\nPeer dependencies (your CDK app must already have these). This\nrelease requires `aws-cdk-lib` 2.273.0 or newer and `constructs`\n10.8.1 or newer, plus Node.js 22.14 or newer for both languages (the\nPython package runs under Node.js through jsii).\n\nFor TypeScript / JavaScript:\n\n```bash\nnpm install aws-cdk-lib@^2.273.0 constructs@^10.8.1\n```\n\nFor Python:\n\n```bash\npip install 'aws-cdk-lib>=2.273.0' 'constructs>=10.8.1'\n```\n\n## Use\n\n### TypeScript\n\n```ts\nimport { Bucket } from 'aws-cdk-lib/aws-s3';\nimport { Database } from 'aws-cdk-lib/aws-glue';\nimport {\n IcebergFormatVersion,\n IcebergTable,\n IcebergType,\n IcebergPartitionTransform,\n} from 'cdk-glue-iceberg-table';\n\nconst bucket = new Bucket(this, 'Warehouse');\nconst db = new Database(this, 'Db', { databaseName: 'analytics' });\n\nnew IcebergTable(this, 'OrdersTable', {\n database: db,\n tableName: 'orders',\n location: `s3://${bucket.bucketName}/analytics/orders/`,\n columns: [\n { name: 'order_id', type: IcebergType.LONG, required: true, id: 1 },\n { name: 'customer_id', type: IcebergType.LONG, required: true, id: 2 },\n { name: 'placed_at', type: IcebergType.TIMESTAMPTZ, required: true, id: 3 },\n ],\n partitionSpec: [\n { sourceColumn: 'placed_at', transform: IcebergPartitionTransform.DAY, fieldId: 1000 },\n { sourceColumn: 'customer_id', transform: IcebergPartitionTransform.bucket(16), fieldId: 1001 },\n ],\n identifierFieldNames: ['order_id'],\n formatVersion: IcebergFormatVersion.V2,\n});\n```\n\n### Python\n\nThe same table in Python — the API mirrors TypeScript with\n`snake_case` props and `PascalCase` types:\n\n```python\nfrom aws_cdk.aws_s3 import Bucket\nfrom aws_cdk.aws_glue import Database\nfrom cdk_glue_iceberg_table import (\n IcebergFormatVersion,\n IcebergTable,\n IcebergType,\n IcebergPartitionTransform,\n)\n\nbucket = Bucket(self, \"Warehouse\")\ndb = Database(self, \"Db\", database_name=\"analytics\")\n\nIcebergTable(self, \"OrdersTable\",\n database=db,\n table_name=\"orders\",\n location=f\"s3://{bucket.bucket_name}/analytics/orders/\",\n columns=[\n {\"name\": \"order_id\", \"type\": IcebergType.LONG, \"required\": True, \"id\": 1},\n {\"name\": \"customer_id\", \"type\": IcebergType.LONG, \"required\": True, \"id\": 2},\n {\"name\": \"placed_at\", \"type\": IcebergType.TIMESTAMPTZ, \"required\": True, \"id\": 3},\n ],\n partition_spec=[\n {\"source_column\": \"placed_at\", \"transform\": IcebergPartitionTransform.DAY, \"field_id\": 1000},\n {\"source_column\": \"customer_id\", \"transform\": IcebergPartitionTransform.bucket(16), \"field_id\": 1001},\n ],\n identifier_field_names=[\"order_id\"],\n format_version=IcebergFormatVersion.V2,\n)\n```\n\nConsumer-facing reference sections:\n\n- [How it compares](#how-it-compares) — `cdk-glue-iceberg-table` vs raw `CfnTable`, custom resources, and runtime SQL DDL.\n- [Using `IcebergTable`](#using-icebergtable) — full API reference with examples.\n- [Format version 3](#format-version-3) — the six v3 types, which engines read them, and the accepted limits.\n- [Two footguns the construct prevents](#two-footguns-the-construct-prevents) — the silent-corruption traps that motivated this construct.\n- [Known limitations](#known-limitations) — what the construct does and doesn't enforce.\n- [FAQ](#faq) — common \"how do I … in CDK / CloudFormation\" questions.\n\n## Exported surface\n\nThe package entry point re-exports the main types you import from\n`cdk-glue-iceberg-table`. In TypeScript / JavaScript the compiled\nsurface lives under `dist/lib/iceberg/` after `npm install`; in Python\nthe same surface is imported from the `cdk_glue_iceberg_table` module\nafter `pip install`:\n\n- **`IcebergTable`** — the L2 construct itself, with `grantRead` / `grantWrite` / `grantReadWrite`, the `fromIcebergTableAttributes(...)` import factory, and `creationOrderFieldIds(columns)` (Python: `creation_order_field_ids`), which returns a map from field path to the id Glue gives that field in a new table; a name containing `.` or a backquote appears in backquotes.\n- **`IcebergType`** — primitive types, the v3 constants `UNKNOWN`, `TIMESTAMP_NS`, `TIMESTAMPTZ_NS`, and `VARIANT`, and the `list` / `map` / `struct` / `decimal` / `fixed` / `geometry(crs?)` / `geography(crs?, algorithm?)` factories. `list` takes an `IcebergListDefinition`, `map` an `IcebergMapDefinition`, and `struct` a list of `IcebergStructFieldDefinition`, each carrying the nested field ids. Renders to the string Glue's `IcebergStructField.type` expects.\n- **`IcebergPartitionTransform`** — identity / `bucket(N)` / `truncate(W)` / year / month / day / hour / void. Each transform validates against the source column type at synth time.\n- **`IcebergDataFormat`** (parquet/orc/avro, default parquet), **`IcebergFormatVersion`** (v1/v2/v3, required — set explicitly per table; Athena cannot query v3 tables), **`IcebergSortDirection`**, **`IcebergNullOrder`**, **`IcebergEdgeAlgorithm`** (`SPHERICAL`, `VINCENTY`, `THOMAS`, `ANDOYER`, `KARNEY`; the second argument of `IcebergType.geography`), plus a `tableProperties` validator that catches misconfigured properties before they leave your machine (wrong codec for the chosen format, `merge-on-read` on a v1 table, non-positive numeric values, …).\n\n## Using `IcebergTable`\n\nA minimal table:\n\n```typescript\nimport {\n Bucket,\n} from 'aws-cdk-lib/aws-s3';\nimport {\n Database,\n} from 'aws-cdk-lib/aws-glue';\nimport {\n IcebergFormatVersion,\n IcebergTable,\n IcebergType,\n} from 'cdk-glue-iceberg-table';\n\nconst bucket = new Bucket(this, 'Warehouse');\n\nconst db = new Database(this, 'Db', {\n databaseName: 'analytics',\n});\n\nnew IcebergTable(this, 'Users', {\n database: db,\n tableName: 'users',\n columns: [\n {\n name: 'user_id',\n type: IcebergType.LONG,\n required: true,\n id: 1,\n },\n {\n name: 'email',\n type: IcebergType.STRING,\n required: true,\n id: 2,\n },\n {\n name: 'signed_up_at',\n type: IcebergType.TIMESTAMPTZ,\n required: true,\n id: 3,\n },\n ],\n location: `s3://${bucket.bucketName}/analytics/users/`,\n formatVersion: IcebergFormatVersion.V2,\n});\n```\n\nEvery top-level column must declare an `id`: a stable, unique,\npositive integer you pick once and never reuse or reassign. Because\nIceberg data files reference fields by id rather than by name, a fixed\nid, declared in creation order when the table is created (below), is\nwhat lets you add, rename, and drop columns across deploys without\ncorrupting old data — see\n[How do I evolve an Iceberg table schema](#how-do-i-evolve-an-iceberg-table-schema-add-rename-or-drop-a-column-in-cloudformation).\nOnce a column is dropped, leave its id retired; never hand it to a new\ncolumn. Nested fields follow the same rule: every struct field takes\nan `id`, every list an `elementId`, and every map a `keyId` and a\n`valueId`. All ids in a schema, top-level and nested, must be distinct\nintegers from 1 to 2147483447.\n\nA new table must declare its ids in creation order. When Glue creates\na table it does not keep the declared ids: it numbers the fields from\n1 in creation order and points the partition spec, sort order and\nidentifier fields at the new ids. An update Glue accepts stores the\ndeclared ids as given, so the first such update of a table created\nwith other ids renumbers its fields; for the update Glue rejects, see\n[Known limitations](#known-limitations). To number a new table, number\nthe top-level columns first, in order, then the nested fields of each\ncolumn in turn (a list's element; a map's key, then its value, then\nthe key's nested fields, then the value's; a struct's fields, then\ntheir nested fields). `IcebergTable.creationOrderFieldIds` returns\nthese ids by field path and ignores the ids in its input:\n\n```typescript\nconst columns = [\n { name: 'id', type: IcebergType.LONG, required: true, id: 1 },\n { name: 'tags', type: IcebergType.list({ element: IcebergType.STRING, elementId: 4 }), id: 2 },\n {\n name: 'attrs',\n type: IcebergType.map({ key: IcebergType.STRING, keyId: 5, value: IcebergType.STRING, valueId: 6 }),\n id: 3,\n },\n];\nIcebergTable.creationOrderFieldIds(columns);\n// { id: 1, tags: 2, attrs: 3, 'tags.element': 4, 'attrs.key': 5, 'attrs.value': 6 }\n```\n\nIds out of creation order are for fields a later deploy adds; see\n[Evolving schema and partitions](#evolving-schema-and-partitions).\n\nA table that exercises most of the surface (partitions, sort order,\nnested types, identifier fields, table properties, removal policy):\n\n```typescript\nimport {\n RemovalPolicy,\n} from 'aws-cdk-lib';\nimport {\n Database,\n} from 'aws-cdk-lib/aws-glue';\nimport {\n IcebergDataFormat,\n IcebergFormatVersion,\n IcebergNullOrder,\n IcebergPartitionTransform,\n IcebergSortDirection,\n IcebergTable,\n IcebergType,\n} from 'cdk-glue-iceberg-table';\n\nnew IcebergTable(this, 'OrdersTable', {\n database: db,\n tableName: 'orders',\n comment: 'Demo Iceberg orders table — exercises partitions, sort order, and merge-on-read.',\n columns: [\n {\n name: 'order_id',\n type: IcebergType.LONG,\n required: true,\n id: 1,\n },\n {\n name: 'customer_id',\n type: IcebergType.LONG,\n required: true,\n id: 2,\n },\n {\n name: 'order_amount',\n type: IcebergType.decimal(12, 2),\n required: true,\n id: 3,\n },\n {\n name: 'currency',\n type: IcebergType.STRING,\n required: true,\n id: 4,\n },\n {\n name: 'placed_at',\n type: IcebergType.TIMESTAMPTZ,\n required: true,\n id: 5,\n },\n {\n name: 'tags',\n type: IcebergType.list({\n element: IcebergType.STRING,\n elementId: 9,\n }),\n id: 6,\n },\n {\n name: 'shipping_address',\n type: IcebergType.struct([\n {\n id: 10,\n name: 'line1',\n type: IcebergType.STRING,\n required: true,\n },\n {\n id: 11,\n name: 'city',\n type: IcebergType.STRING,\n required: true,\n },\n {\n id: 12,\n name: 'country',\n type: IcebergType.STRING,\n required: true,\n },\n {\n id: 13,\n name: 'postal_code',\n type: IcebergType.STRING,\n },\n ]),\n id: 7,\n },\n {\n name: 'metadata',\n type: IcebergType.map({\n key: IcebergType.STRING,\n keyId: 14,\n value: IcebergType.STRING,\n valueId: 15,\n }),\n id: 8,\n },\n ],\n location: `s3://${bucket.bucketName}/analytics/orders/`,\n partitionSpec: [\n {\n sourceColumn: 'placed_at',\n transform: IcebergPartitionTransform.DAY,\n fieldId: 1000,\n },\n {\n sourceColumn: 'customer_id',\n transform: IcebergPartitionTransform.bucket(16),\n fieldId: 1001,\n },\n ],\n sortOrder: [\n {\n sourceColumn: 'placed_at',\n direction: IcebergSortDirection.ASC,\n nullOrder: IcebergNullOrder.NULLS_LAST,\n },\n {\n sourceColumn: 'order_id',\n direction: IcebergSortDirection.ASC,\n },\n ],\n identifierFieldNames: [\n 'order_id',\n ],\n dataFormat: IcebergDataFormat.PARQUET,\n formatVersion: IcebergFormatVersion.V2,\n tableProperties: {\n 'write.parquet.compression-codec': 'zstd',\n 'write.delete.mode': 'merge-on-read',\n 'write.update.mode': 'merge-on-read',\n 'write.merge.mode': 'merge-on-read',\n 'write.target-file-size-bytes': '134217728',\n 'history.expire.min-snapshots-to-keep': '5',\n 'gc.enabled': 'true',\n },\n removalPolicy: RemovalPolicy.DESTROY,\n});\n```\n\nEach partition field also pins a `fieldId`: an integer of 1000 or\nabove (the Iceberg spec reserves lower ids for schema columns), unique\nacross the table's entire partition-spec history. The discipline is\nthe inverse of the column-id rule. A column keeps its id forever; a\npartition field keeps its id only while it stays untouched. Change\nanything about a field — swap `month` for `day`, point it at a\ndifferent source column — and it becomes a *new* field that needs a\nfresh, never-before-used id, while the old id retires with the old\nspec. Reusing a retired id (or reassigning an id to a different field)\nproduces a table that Athena still reads but Spark and Trino reject\nwith `ValidationException: Conflicting partition fields`.\n\n`identifierFieldNames` lists the columns that together identify a row\nand renders as the schema's `identifier-field-ids`. Each one must be a\n`required: true` column (Glue rejects an optional one), and `cdk synth`\nrejects an identifier column of type float, double, list, map, struct,\nunknown, variant, geometry or geography. The construct prefixes each\nidentifier column's `doc` with `(PK) `, so a `doc` you write must not\nstart with `(PK) `; see [Evolving schema and\npartitions](#evolving-schema-and-partitions).\n\nEvery string you pass is a literal string, not a token, and an\nenum-typed one must be a member of its enum; the exceptions are\n`location`, `comment`, table property values, and the `tableName` of\nan imported table.\n\nThe resulting Iceberg `metadata.json` for this table contains every\nfeature you set:\n\n```json\n{\n \"format-version\": 2,\n \"table-uuid\": \"39a948f9-...\",\n \"current-schema-id\": 0,\n \"schemas\": [\n {\n \"schema-id\": 0,\n \"identifier-field-ids\": [1],\n \"fields\": [\n { \"id\": 1, \"name\": \"order_id\", \"required\": true, \"type\": \"long\", \"doc\": \"(PK) \" },\n { \"id\": 2, \"name\": \"customer_id\", \"required\": true, \"type\": \"long\" },\n { \"id\": 3, \"name\": \"order_amount\", \"required\": true, \"type\": \"decimal(12, 2)\" },\n { \"id\": 4, \"name\": \"currency\", \"required\": true, \"type\": \"string\" },\n { \"id\": 5, \"name\": \"placed_at\", \"required\": true, \"type\": \"timestamptz\" },\n { \"id\": 6, \"name\": \"tags\", \"required\": false,\n \"type\": { \"type\": \"list\", \"element-id\": 9, \"element\": \"string\", \"element-required\": false } },\n { \"id\": 7, \"name\": \"shipping_address\", \"required\": false,\n \"type\": { \"type\": \"struct\", \"fields\": [\n { \"id\": 10, \"name\": \"line1\", \"required\": true, \"type\": \"string\" },\n { \"id\": 11, \"name\": \"city\", \"required\": true, \"type\": \"string\" },\n { \"id\": 12, \"name\": \"country\", \"required\": true, \"type\": \"string\" },\n { \"id\": 13, \"name\": \"postal_code\", \"required\": false, \"type\": \"string\" }\n ] } },\n { \"id\": 8, \"name\": \"metadata\", \"required\": false,\n \"type\": { \"type\": \"map\", \"key-id\": 14, \"key\": \"string\", \"value-id\": 15,\n \"value-required\": false, \"value\": \"string\" } }\n ]\n }\n ],\n \"partition-specs\": [\n { \"spec-id\": 0, \"fields\": [\n { \"name\": \"placed_at_day\", \"transform\": \"day\", \"source-id\": 5, \"field-id\": 1000 },\n { \"name\": \"customer_id_bucket\", \"transform\": \"bucket[16]\", \"source-id\": 2, \"field-id\": 1001 }\n ]}\n ],\n \"sort-orders\": [\n { \"order-id\": 1, \"fields\": [\n { \"transform\": \"identity\", \"source-id\": 5, \"direction\": \"asc\", \"null-order\": \"nulls-last\" },\n { \"transform\": \"identity\", \"source-id\": 1, \"direction\": \"asc\", \"null-order\": \"nulls-last\" }\n ]}\n ],\n \"properties\": {\n \"format-version\": \"2\",\n \"write.format.default\": \"parquet\",\n \"write.parquet.compression-codec\": \"zstd\",\n \"write.merge.mode\": \"merge-on-read\",\n \"write.update.mode\": \"merge-on-read\",\n \"write.delete.mode\": \"merge-on-read\",\n \"write.target-file-size-bytes\": \"134217728\",\n \"history.expire.min-snapshots-to-keep\": \"5\",\n \"gc.enabled\": \"true\",\n \"comment\": \"Demo Iceberg orders table — exercises partitions, sort order, and merge-on-read.\"\n }\n}\n```\n\n### Format version 3\n\nSet `formatVersion: IcebergFormatVersion.V3` to create a v3 table. The\nsix v3 types (below) are only accepted on a V3 table, at any nesting\ndepth: inside a struct, as a list element, or as a map key or value.\nSynth fails on a V1 or V2 table that uses one.\n\n```typescript\nimport {\n IcebergEdgeAlgorithm,\n IcebergFormatVersion,\n IcebergTable,\n IcebergType,\n} from 'cdk-glue-iceberg-table';\n\nnew IcebergTable(this, 'Events', {\n database: db,\n tableName: 'events',\n location: `s3://${bucket.bucketName}/analytics/events/`,\n columns: [\n { name: 'occurred_at', type: IcebergType.TIMESTAMP_NS, id: 1 },\n { name: 'payload', type: IcebergType.VARIANT, id: 2 },\n {\n name: 'origin',\n type: IcebergType.geography('OGC:CRS84', IcebergEdgeAlgorithm.SPHERICAL),\n id: 3,\n },\n ],\n formatVersion: IcebergFormatVersion.V3,\n});\n```\n\nThe same table in Python:\n\n```python\nfrom cdk_glue_iceberg_table import (\n IcebergEdgeAlgorithm,\n IcebergFormatVersion,\n IcebergTable,\n IcebergType,\n)\n\nIcebergTable(self, \"Events\",\n database=db,\n table_name=\"events\",\n location=f\"s3://{bucket.bucket_name}/analytics/events/\",\n columns=[\n {\"name\": \"occurred_at\", \"type\": IcebergType.TIMESTAMP_NS, \"id\": 1},\n {\"name\": \"payload\", \"type\": IcebergType.VARIANT, \"id\": 2},\n {\n \"name\": \"origin\",\n \"type\": IcebergType.geography(\"OGC:CRS84\", IcebergEdgeAlgorithm.SPHERICAL),\n \"id\": 3,\n },\n ],\n format_version=IcebergFormatVersion.V3,\n)\n```\n\nThis table has a `timestamp_ns` column; see [Known limitations](#known-limitations)\nbefore reading it from upstream Spark.\n\nThe v3 types, with the rules `cdk synth` enforces:\n\n| Type | Factory | Rendered string | Partition and identifier rules |\n| --- | --- | --- | --- |\n| unknown | `IcebergType.UNKNOWN` | `unknown` | Must be optional, as a column, list element, or map value; never a map key. Partition source only with `void`. Not an identifier field. |\n| timestamp with nanoseconds | `IcebergType.TIMESTAMP_NS` | `timestamp_ns` | `identity`, `year`, `month`, `day`, `hour`, `bucket(N)`, `void`; not `truncate(W)`. Allowed as an identifier field. |\n| timestamptz with nanoseconds | `IcebergType.TIMESTAMPTZ_NS` | `timestamptz_ns` | Same as `timestamp_ns`. |\n| variant | `IcebergType.VARIANT` | `variant` | Never a partition or sort source, `void` included. Not an identifier field. |\n| geometry | `IcebergType.geometry(crs?)` | `geometry`, or `geometry(<crs>)` when a CRS is given | Partition source only with `void`. Not an identifier field. |\n| geography | `IcebergType.geography(crs?, algorithm?)` | `geography`, `geography(<crs>)`, or `geography(<crs>, <algorithm>)` when an algorithm is given, such as `geography(OGC:CRS84, spherical)` | Same as `geometry`. |\n\nA geometry or geography `crs` is an identifier such as `OGC:CRS84` or\n`EPSG:3857`; whitespace, parentheses, braces, and commas are rejected.\nWhen `algorithm` is set without a `crs`, the rendered string spells out\n`OGC:CRS84`.\n\nWhich engines read a v3 table created by the construct:\n\n| Engine | v3 tables | Notes |\n| --- | --- | --- |\n| Spark 4.1.1 + Iceberg 1.11.0 (the integration-test runner) | Yes | Reads and writes tables the construct creates, including deletion vectors, row lineage, `variant` and `unknown`, except tables with a `geometry`, `geography` or nanosecond-timestamp column ([Known limitations](#known-limitations)). |\n| AWS Glue 6.0 | Documented | The [AWS Glue versions](https://docs.aws.amazon.com/glue/latest/dg/release-notes.html) page lists \"Iceberg format version 3 with VARIANT data type, deletion vectors, row lineage tracking, nanosecond timestamps, and geo types\". The integration suites run on Glue 6.0's Spark 4.1.1 and Iceberg 1.11.0 (`scripts/spark/spark-env.sh`); the Glue job runtime itself is not exercised. |\n| Amazon EMR Spark 8.1.0 (Spark 4.1.1, Iceberg 1.11.0-amzn-0) | Documented | The [emr-spark-8.1.0 release notes](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-spark810-release.html) state \"Amazon EMR Spark 8.1.0 extends Iceberg v3 spec support for Spark workloads\". The integration suites do not run on EMR 8.1. |\n| Athena SQL | No | The [Athena Iceberg page](https://docs.aws.amazon.com/athena/latest/ug/querying-iceberg.html) states \"Athena only creates and operates on Iceberg v2 tables.\" The v2 integration suites also run through Athena (see [Does it work with Athena and Lake Formation?](#does-it-work-with-athena-and-lake-formation)); no v3 table is queried through Athena. |\n\n### Granting access\n\n```typescript\ntable.grantRead(role); // Glue read + S3 read on the table's prefix\ntable.grantWrite(role); // Glue write + S3 write\ntable.grantReadWrite(role);\n```\n\nThe `grant*` helpers issue **IAM grants only**. Under Lake Formation\nyou still add the matching `SELECT` / `INSERT` / `DELETE` LF grants on\ntop of the construct's IAM grants for Athena queries to succeed.\n\n### Importing an existing table\n\n```typescript\nconst existing = IcebergTable.fromIcebergTableAttributes(this, 'Orders', {\n database: db,\n tableName: 'orders',\n location: 's3://my-bucket/analytics/orders/',\n});\nexisting.grantRead(role);\n```\n\n### Evolving schema and partitions\n\nChange the `columns` array (or `partitionSpec`) and run `cdk deploy`\nagain. The construct passes the new schema to Glue's `UpdateTable`,\nwhich writes a new `metadata.json` with a new `schema-id`; existing\ndata files stay readable because each column's `id` is pinned to the\nid the table holds and never reused. Adds, renames (same `id`, new\n`name`), and drops all flow through `cdk deploy` alone — no\nout-of-band SQL DDL.\n\nNested fields evolve the same way. Each struct field, list element,\nmap key, and map value keeps the id you gave it (the rule is under\n[Using `IcebergTable`](#using-icebergtable)), so adding a column or a\nstruct field anywhere in the schema leaves every other id unchanged. A\nnew nested field takes an id no field of the table has ever used:\n\n```typescript\ntype: IcebergType.struct([\n { id: 10, name: 'line1', type: IcebergType.STRING },\n { id: 16, name: 'line2', type: IcebergType.STRING }, // new field, never-used id\n { id: 11, name: 'city', type: IcebergType.STRING },\n]),\n```\n\nSuch an id is out of creation order, which is expected once a table\nhas evolved: creation order applies only to the ids a table is created\nwith (see [Using `IcebergTable`](#using-icebergtable)).\n\nUpgrading from a version before 0.12.0, which numbered nested fields\nitself: declare the ids the table's current `metadata.json` holds,\ntop-level and nested (each field `id`, `element-id`, `key-id` and\n`value-id`), or the next deploy renumbers the fields that differ and\nexisting data files read under the wrong field. A nested type object\nshared by two columns now fails synth with a duplicate id; give each\ncolumn its own nested type with its own ids. The list element and map\nvalue nullability default also changed: `elementRequired` and\n`valueRequired` now default to `false`. Earlier versions made list\nelements required by default and map values required unless the third\nargument of `map` was `false`; set `elementRequired: true` or\n`valueRequired: true` wherever the deployed schema has\n`\"element-required\": true` or `\"value-required\": true`.\n\nGlue's `UpdateTable` reuses an earlier schema whose fields (name,\ntype, `required`, `doc`) match the request, together with that\nschema's `identifier-field-ids`. The construct therefore prefixes the\n`doc` of every identifier column with `(PK) ` (just `(PK) ` when the\ncolumn has no `doc`), shown as the column comment, so every\nidentifier change is a field change. On a table whose schema history\nwas written with the marker, identifier changes flow through `cdk\ndeploy` like column changes.\n\nPartition evolution flows the same way, with one extra rule on\n`fieldId`: a changed partition field is a new partition field. To move\na table from `month(placed_at)` to `day(placed_at)`, drop the month\nentry and add a day entry under a fresh `fieldId` — never recycle the\nmonth field's id:\n\n```typescript\npartitionSpec: [\n // was: { sourceColumn: 'placed_at', transform: IcebergPartitionTransform.MONTH, fieldId: 1000 },\n {\n sourceColumn: 'placed_at',\n transform: IcebergPartitionTransform.DAY,\n fieldId: 1001,\n },\n],\n```\n\nOld data files written under the month spec stay readable; new writes\npartition by day. Reusing `1000` for the day field instead corrupts\nthe spec history for strict engines (Spark, Trino) while Athena keeps\nworking — the failure only surfaces at Spark runtime.\n\nA changed `sortOrder` also flows through `cdk deploy`. Glue adds it to\n`sort-orders` under the next `order-id` and points\n`default-sort-order-id` at it; the earlier orders stay in the list.\nA change to `tableProperties` alone writes new metadata that keeps the\nsame `current-schema-id`, partition spec and sort order.\n\n### Inserting and querying\n\n```sql\n-- INSERT into the orders table\nINSERT INTO sample_database.orders VALUES\n (1001, 5001, DECIMAL '149.99', 'USD',\n TIMESTAMP '2026-05-20 09:15:00 UTC',\n ARRAY['holiday-promo','first-order'],\n CAST(ROW('1 Infinite Loop','Cupertino','US','95014')\n AS ROW(line1 VARCHAR,city VARCHAR,country VARCHAR,postal_code VARCHAR)),\n MAP(ARRAY['channel','utm'], ARRAY['web','google'])),\n -- ... more rows\n;\n\n-- merge-on-read DELETE (only legal because we chose v2 + merge-on-read mode)\nDELETE FROM sample_database.orders WHERE order_id = 1003;\n\n-- merge-on-read UPDATE\nUPDATE sample_database.orders SET currency = 'GBP' WHERE customer_id = 5002;\n\n-- SELECT\nSELECT customer_id, SUM(order_amount) AS total\n FROM sample_database.orders\n GROUP BY 1\n ORDER BY 2 DESC;\n```\n\n## Two footguns the construct prevents\n\n### Footgun #1 — schema under `storageDescriptor.columns`\n\nThe CREATE succeeds but the first UPDATE silently strips\n`table_type=ICEBERG` from the table's Glue parameters, and Athena\nqueries after that fail with `HIVE_UNSUPPORTED_FORMAT`.\n\n```typescript\n// DON'T DO THIS — what most StackOverflow / re:Post examples show\nnew CfnTable(this, 'OrdersBad', {\n catalogId: this.account,\n databaseName: 'analytics',\n tableInput: {\n name: 'orders',\n tableType: 'EXTERNAL_TABLE',\n parameters: {\n table_type: 'ICEBERG',\n },\n storageDescriptor: {\n location: 's3://.../orders/',\n columns: [\n /* ... */\n ],\n },\n },\n openTableFormatInput: {\n icebergInput: {\n metadataOperation: 'CREATE',\n version: '2',\n },\n },\n});\n```\n\n`IcebergTable` instead always emits schema/partitions/sort/properties\nunder `openTableFormatInput.icebergInput.icebergTableInput`, never\nunder `storageDescriptor`.\n\n### Footgun #2 — `tableInput` co-present with `openTableFormatInput`\n\nEven setting just `tableInput: { name: 'foo' }` next to\n`openTableFormatInput` returns\n`\"Table metadata is expected only via TableInput or via IcebergTableInputProperties inside OpenTableFormatInput\"`.\nThe construct never emits `tableInput`; the table-level comment goes\ninto `tableProperties['comment']`, which lives inside\n`icebergTableInput.properties`.\n\n(There is a third footgun, field-id reuse after a column drop, that\nthe construct does **not** prevent. See the next section.)\n\n## Known limitations\n\n- **Creation order is not checked.** The construct cannot tell at synth whether a table is new or already deployed, so it accepts a new table whose ids are not in creation order (the rule is under [Using `IcebergTable`](#using-icebergtable)). When the first update of such a table changes the id of a column an identity partition is sourced from, Glue rejects the update with `Cannot create identity partition sourced from different field in schema` and the CloudFormation rollback fails the same way, leaving the stack in `UPDATE_ROLLBACK_FAILED`.\n- **Field-id reuse is not detected across deploys.** This applies to nested ids (struct field, list element, map key and value) as well as column ids. If you drop a column with `id = 5` and then add a different column with `id = 5` in a later deploy, Glue accepts the UPDATE and Iceberg's metadata silently violates the \"never reuse a retired id\" invariant. Readers projecting old snapshots will surface deleted data under the new field's name. The construct enforces uniqueness **within one deploy** (`duplicate field id N` validator), but it doesn't compare against the live table state. The safe workflow is to treat dropped ids as retired forever.\n- **Partition field-id reuse is not detected across deploys either.** The same live-state blindness applies to partition `fieldId`s: the construct validates them within one deploy (integer >= 1000, unique in the spec), but it cannot tell that the id you pinned already appeared in an earlier spec of the deployed table. The invariant partition ids must uphold is stricter than the column one — unique across the table's **entire spec history**, so a changed field (different transform or source column) must take a fresh id rather than keep its old one. Violate it and strict engines (Spark, Trino) reject the table with `Conflicting partition fields` while Athena keeps answering, masking the break until Spark runtime. The safe workflow: treat every id that has ever appeared in any spec as retired, and allocate new fields the next never-used id. A partition change needs a new source column or transform; Glue ignores a `fieldId`-only change.\n- **`last-partition-id` is written by Glue, not by the construct.** The construct supplies the spec's field ids; Glue's `UpdateTable` computes the table's `last-partition-id` counter when it writes the new metadata. The repo's integration test asserts the counter keeps up with the highest supplied field id after a partition evolution, but engines that later evolve the spec themselves (e.g. Spark `ALTER TABLE … ADD PARTITION FIELD`) allocate from that counter — if you mix CDK-managed and engine-managed partition evolution, verify the counter in `metadata.json` before trusting engine-side changes.\n- **A rolled-back deploy leaves its schema in the table's history.** When a deploy that adds a column updates the table and then fails on another resource, the stack ends in `UPDATE_ROLLBACK_COMPLETE` and `current-schema-id` is back to its earlier value, so the column is gone and the rows read as before. The schema that held the column stays in `schemas`, and `last-column-id` stays at the column's id. A clean redeploy of the same change makes that schema current again without adding a schema. Treat an id from a rolled-back deploy as used: give it only to the column that deploy added.\n- **Removing the last identifier from a table created with identifiers before 0.11.0 can bring the old ids back.** That table's history holds an unmarked schema with ids, and Glue reuses it when the rendered fields match it again. Change a column `doc` in the same deploy that removes the last identifier.\n- **CREATE-only metadata operation.** The CFN `IcebergInput.metadataOperation` only accepts `CREATE`; the construct always emits that. Subsequent deploys use Glue's normal `UpdateTable` path, which writes new Iceberg metadata in-place.\n- **Format version is immutable after CREATE.** Glue ignores a V2 to V3 `formatVersion` change, though `properties.format-version` then reads `3`. Keep `formatVersion` at the table's real version, or destroy + recreate the table to change it. An engine can upgrade a v2 table to v3 in place with `ALTER TABLE ... SET TBLPROPERTIES ('format-version' = '3')`; after that, set `formatVersion` to `V3` so the next deploy declares the version the table already has.\n- **`merge-on-read` requires v2 or later.** The construct rejects `write.{delete,update,merge}.mode = merge-on-read` on a v1 table at synth time.\n- **Column defaults are not available.** Iceberg v3 `initial-default` and `write-default` cannot be declared through CloudFormation: the `AWS::Glue::Table` resource schema has no `InitialDefault` or `WriteDefault` property. Revisit when that schema gains the two properties.\n- **Nanosecond timestamps are catalog-only for Spark 4.1.1 with Iceberg 1.11.0.** In [`TypeToSparkType`](https://github.com/apache/iceberg/blob/apache-iceberg-1.11.0/spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/TypeToSparkType.java) at the `apache-iceberg-1.11.0` tag, `primitive()` has no case for the `TIMESTAMP_NANO` type id, so a table with a `timestamp_ns` or `timestamptz_ns` column reaches the `Cannot convert unsupported type to Spark` error. The integration suite asserts these columns from `metadata.json` only.\n- **Geometry and geography columns are catalog-only for Spark 4.1.1 with Iceberg 1.11.0, the versions AWS Glue 6.0 ships.** The first Spark read of a table holding a `geography` and a `geometry` column failed with `UnsupportedOperationException: Cannot convert unsupported type to Spark: geography(OGC:CRS84, spherical)` on those versions. [`TypeToSparkType`](https://github.com/apache/iceberg/blob/apache-iceberg-1.11.0/spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/TypeToSparkType.java) at the `apache-iceberg-1.11.0` tag has no conversion for `geometry` either. The integration suite deploys these columns on a table no Spark job opens and asserts them from `metadata.json` only.\n- **Athena DDL features that don't surface through CFN** (e.g. `ALTER TABLE … SET LOCATION`, `bucketed_by` / `bucket_count` Hive clauses) are not exposed. Use `IcebergPartitionTransform.bucket(N)` instead of Hive bucketing.\n- **Dropping a partition column requires a `void` intermediate per the Iceberg spec**, and the CFN `OpenTableFormatInput` cannot express that. The construct accepts the change, but Athena queries against the result will fail with `Type cannot be null`. The safe pattern is to drop partitions that source from a column while keeping that column in the schema, and only drop a column once it is no longer partitioning anything.\n\n## FAQ\n\n### How do I create an Apache Iceberg table in AWS CDK?\n\nInstall `cdk-glue-iceberg-table`, then declare an `IcebergTable` with a\ndatabase, a column list, and an S3 `location` — see [Use](#use).\n`cdk deploy` creates the Glue Data Catalog table and writes the\nIceberg `metadata.json` under your S3 prefix. No custom resource or\nLambda is involved; it is a plain `AWS::Glue::Table` in your\nCloudFormation template.\n\n### How do I evolve an Iceberg table schema (add, rename, or drop a column) in CloudFormation?\n\nChange the `columns` array and run `cdk deploy` again. The construct\npasses the new schema to Glue's `UpdateTable`, which writes a new\n`metadata.json` with a new `schema-id`; existing data files stay\nreadable because each column's `id` is pinned to the id the table\nholds and never reused.\nPartition changes work the same way, except a changed partition field\ntakes a fresh `fieldId` instead of keeping its old one. See [Evolving\nschema and partitions](#evolving-schema-and-partitions).\n\n### Does CloudFormation support Iceberg tables natively?\n\nYes, through `AWS::Glue::Table` with `OpenTableFormatInput.IcebergInput`,\ndocumented by AWS in [December 2025](https://aws.amazon.com/blogs/big-data/create-and-update-apache-iceberg-tables-with-partitions-in-the-aws-glue-data-catalog-using-the-aws-sdk-and-aws-cloudformation).\nThe catch is that the raw shape corrupts the table on the first\n`Update` if you place schema under `storageDescriptor.columns` or set\n`tableInput` alongside `openTableFormatInput`. This construct only ever\nemits the safe shape and gives you no way to express the unsafe ones.\nSee [Two footguns the construct prevents](#two-footguns-the-construct-prevents).\n\n### What is the difference between cdk-glue-iceberg-table and a raw CfnTable?\n\nA raw `CfnTable` makes you hand-write the `OpenTableFormatInput` JSON\nand own both silent-corruption footguns. `cdk-glue-iceberg-table` gives\nyou a typed `IcebergType` / `IcebergPartitionTransform` API,\nsynth-time validation (partition transforms checked against column\ntypes, format/version mismatches caught before deploy), pinned field\nIDs for safe evolution (declared in creation order for a new table),\nand `grantRead` / `grantWrite` helpers. See\n[How it compares](#how-it-compares).\n\n### How do I create a partitioned Iceberg table in CDK?\n\nPass a `partitionSpec` of `IcebergPartitionTransform` entries —\n`identity`, `bucket(N)`, `truncate(W)`, `year`, `month`, `day`, `hour`,\nor `void` — each pinned to a `fieldId` of 1000 or above. Transforms are\nvalidated against their source column's type at synth time. See\n[Using `IcebergTable`](#using-icebergtable).\n\n### Does it work with Athena and Lake Formation?\n\nYes for v2 tables, no for v3 (see the engine matrix in [Format\nversion 3](#format-version-3)). The demo app in the\n[`arceus`](https://github.com/ksco92/arceus) repo registers its tables\nwith Lake Formation, and its v2 integration suites query them through\nAthena as well as Spark, on the same tables:\n\n- merge-on-read `INSERT`, `UPDATE`, `DELETE` and `MERGE INTO`, time\n travel (`FOR VERSION AS OF` / `FOR TIMESTAMP AS OF`), `OPTIMIZE ...\n REWRITE DATA USING BIN_PACK`, and `VACUUM`;\n- a read after every schema, partition, identifier and nested-field\n evolution step;\n- the `(PK) ` comment on identifier columns, read from\n `information_schema.columns`;\n- rows written by Spark read through Athena, and rows written by Athena\n read through Spark.\n\nThe suites grant the querying principal `SELECT`, `INSERT`, `DELETE`,\n`ALTER` and `DESCRIBE` through Lake Formation. The construct's `grant*`\nhelpers issue IAM grants only; under Lake Formation you add the\nmatching LF grants. See [Granting access](#granting-access).\n\n### Can I use Iceberg v2 merge-on-read (row-level UPDATE and DELETE)?\n\nYes — set `formatVersion: IcebergFormatVersion.V2` and the\n`write.{delete,update,merge}.mode = merge-on-read` table properties.\nThe construct rejects merge-on-read on a v1 table at synth time.\n\n### Can I create an Iceberg v3 table?\n\nYes. Set `formatVersion: IcebergFormatVersion.V3`; see [Format\nversion 3](#format-version-3) for the types, the engine matrix and the\nlimits.\n\n## Contributing\n\nDevelopment, the monorepo layout, and the demo app live in [CONTRIBUTING.md](https://github.com/ksco92/arceus/blob/main/CONTRIBUTING.md).\n\n## License\n\n[MIT](https://github.com/ksco92/arceus/blob/main/LICENSE).\n"
|
|
9754
|
+
"markdown": "# cdk-glue-iceberg-table\n\n[](https://github.com/ksco92/arceus/actions/workflows/ci.yml)\n[](https://codecov.io/gh/ksco92/arceus)\n[](https://www.npmjs.com/package/cdk-glue-iceberg-table)\n[](https://pypi.org/project/cdk-glue-iceberg-table/)\n[](https://constructs.dev/packages/cdk-glue-iceberg-table)\n[](https://www.npmjs.com/package/cdk-glue-iceberg-table)\n[](https://github.com/ksco92/arceus/blob/main/LICENSE)\n\n**`cdk-glue-iceberg-table` is an AWS CDK L2 construct to create and\nevolve Apache Iceberg tables in the AWS Glue Data Catalog — schema and\npartition changes that survive CloudFormation updates, via cdk\ndeploy.** It supports Iceberg format version 3 (`variant`, nanosecond\ntimestamps, `geometry` / `geography`, `unknown`). It emits the exact\n`AWS::Glue::Table` / `OpenTableFormatInput` shape, so a single `cdk\ndeploy` creates, evolves, and destroys a table like any other CDK\nresource. No custom resource, no Lambda, no \"`cdk deploy` and then run\nthis SQL by hand\" two-step. Table changes (new columns, renames, drops,\nnew partition fields) land as a reviewed diff in a pull request and\napply through `cdk deploy`.\n\nStatus (October 2026): published on npm (TypeScript/JavaScript) and\nPyPI (Python), pre-1.0, with a public surface guarded on every PR by two\nconsumer jobs (`e2e-consumer` compiles and synthesizes an app against a\npinned published version, `packed-consumer` does the same against the PR's\nown `npm pack` tarball) plus real-AWS integration suites, including ones\nfor format version 3. The multi-language packages are generated\nfrom one TypeScript source with [jsii](https://aws.github.io/jsii/)\nand indexed on [Construct\nHub](https://constructs.dev/packages/cdk-glue-iceberg-table).\nDeveloped in the [`ksco92/arceus`](https://github.com/ksco92/arceus)\nmonorepo, which also holds a CDK demo app that dogfoods the construct\nagainst a real AWS account.\n\n### Why this exists\n\nAWS documents the CloudFormation shape for Iceberg tables ([AWS Big\nData blog, December 2025](https://aws.amazon.com/blogs/big-data/create-and-update-apache-iceberg-tables-with-partitions-in-the-aws-glue-data-catalog-using-the-aws-sdk-and-aws-cloudformation)),\nbut raw `AWS::Glue::Table` is a minefield: the CREATE succeeds and the\n*first* `Update` silently strips `table_type=ICEBERG`, after which\nevery Athena query fails with `HIVE_UNSUPPORTED_FORMAT`. The\nmotivating CDK issue is [aws/aws-cdk#29660](https://github.com/aws/aws-cdk/issues/29660);\n[`manmartgarc`'s comment](https://github.com/aws/aws-cdk/issues/29660#issuecomment-4411359248)\ndocuments the only working shape and the silent-corruption traps you\nhit by getting it slightly wrong. This construct implements that\nshape, refuses to emit the unsafe alternatives, and pins Iceberg field\nIDs (declared [in creation order](#using-icebergtable) for a new\ntable) so schema evolution never orphans existing data. It was the\nbasis of an upstream proposal to land an `IcebergTable` in\n`@aws-cdk/aws-glue-alpha` ([aws/aws-cdk#37988](https://github.com/aws/aws-cdk/pull/37988)),\nclosed unmerged in September 2026.\n\n### How it compares\n\n| Approach | Declarative IaC (in the PR) | In-place schema + partition evolution | Prevents the silent-corruption footguns | Typed API + synth-time validation |\n| --- | --- | --- | --- | --- |\n| Raw `CfnTable` (L1) | ✅ | ⚠️ only if you hand-write the exact `OpenTableFormatInput` shape | ❌ you own both footguns | ❌ |\n| CDK custom resource (Lambda + Glue SDK) | ⚠️ via a custom resource you maintain | ⚠️ you write the diff logic | ⚠️ your code's responsibility | ❌ |\n| Spark SQL DDL, or Athena SQL DDL, at job runtime | ❌ imperative, outside the PR | ✅ but outside CloudFormation | n/a | ❌ |\n| **`cdk-glue-iceberg-table`** | ✅ | ✅ via `cdk deploy` | ✅ both prevented by construction | ✅ |\n\n## Install\n\nTypeScript / JavaScript (npm):\n\n```bash\nnpm install cdk-glue-iceberg-table\n```\n\nPython (PyPI):\n\n```bash\npip install cdk-glue-iceberg-table\n```\n\nPeer dependencies (your CDK app must already have these). This\nrelease requires `aws-cdk-lib` 2.273.0 or newer and `constructs`\n10.8.1 or newer, plus Node.js 22.14 or newer for both languages (the\nPython package runs under Node.js through jsii).\n\nFor TypeScript / JavaScript:\n\n```bash\nnpm install aws-cdk-lib@^2.273.0 constructs@^10.8.1\n```\n\nFor Python:\n\n```bash\npip install 'aws-cdk-lib>=2.273.0' 'constructs>=10.8.1'\n```\n\n## Use\n\n### TypeScript\n\n```ts\nimport { Bucket } from 'aws-cdk-lib/aws-s3';\nimport { Database } from 'aws-cdk-lib/aws-glue';\nimport {\n IcebergFormatVersion,\n IcebergTable,\n IcebergType,\n IcebergPartitionTransform,\n} from 'cdk-glue-iceberg-table';\n\nconst bucket = new Bucket(this, 'Warehouse');\nconst db = new Database(this, 'Db', { databaseName: 'analytics' });\n\nnew IcebergTable(this, 'OrdersTable', {\n database: db,\n tableName: 'orders',\n location: `s3://${bucket.bucketName}/analytics/orders/`,\n columns: [\n { name: 'order_id', type: IcebergType.LONG, required: true, id: 1 },\n { name: 'customer_id', type: IcebergType.LONG, required: true, id: 2 },\n { name: 'placed_at', type: IcebergType.TIMESTAMPTZ, required: true, id: 3 },\n ],\n partitionSpec: [\n { sourceColumn: 'placed_at', transform: IcebergPartitionTransform.DAY, fieldId: 1000 },\n { sourceColumn: 'customer_id', transform: IcebergPartitionTransform.bucket(16), fieldId: 1001 },\n ],\n identifierFieldNames: ['order_id'],\n formatVersion: IcebergFormatVersion.V2,\n});\n```\n\n### Python\n\nThe same table in Python — the API mirrors TypeScript with\n`snake_case` props and `PascalCase` types:\n\n```python\nfrom aws_cdk.aws_s3 import Bucket\nfrom aws_cdk.aws_glue import Database\nfrom cdk_glue_iceberg_table import (\n IcebergFormatVersion,\n IcebergTable,\n IcebergType,\n IcebergPartitionTransform,\n)\n\nbucket = Bucket(self, \"Warehouse\")\ndb = Database(self, \"Db\", database_name=\"analytics\")\n\nIcebergTable(self, \"OrdersTable\",\n database=db,\n table_name=\"orders\",\n location=f\"s3://{bucket.bucket_name}/analytics/orders/\",\n columns=[\n {\"name\": \"order_id\", \"type\": IcebergType.LONG, \"required\": True, \"id\": 1},\n {\"name\": \"customer_id\", \"type\": IcebergType.LONG, \"required\": True, \"id\": 2},\n {\"name\": \"placed_at\", \"type\": IcebergType.TIMESTAMPTZ, \"required\": True, \"id\": 3},\n ],\n partition_spec=[\n {\"source_column\": \"placed_at\", \"transform\": IcebergPartitionTransform.DAY, \"field_id\": 1000},\n {\"source_column\": \"customer_id\", \"transform\": IcebergPartitionTransform.bucket(16), \"field_id\": 1001},\n ],\n identifier_field_names=[\"order_id\"],\n format_version=IcebergFormatVersion.V2,\n)\n```\n\nConsumer-facing reference sections:\n\n- [How it compares](#how-it-compares) — `cdk-glue-iceberg-table` vs raw `CfnTable`, custom resources, and runtime SQL DDL.\n- [Using `IcebergTable`](#using-icebergtable) — full API reference with examples.\n- [Format version 3](#format-version-3) — the six v3 types, which engines read them, and the accepted limits.\n- [Two footguns the construct prevents](#two-footguns-the-construct-prevents) — the silent-corruption traps that motivated this construct.\n- [Known limitations](#known-limitations) — what the construct does and doesn't enforce.\n- [FAQ](#faq) — common \"how do I … in CDK / CloudFormation\" questions.\n\n## Exported surface\n\nThe package entry point re-exports the main types you import from\n`cdk-glue-iceberg-table`. In TypeScript / JavaScript the compiled\nsurface lives under `dist/lib/iceberg/` after `npm install`; in Python\nthe same surface is imported from the `cdk_glue_iceberg_table` module\nafter `pip install`:\n\n- **`IcebergTable`** — the L2 construct itself, with `grantRead` / `grantWrite` / `grantReadWrite` (each taking an optional `IcebergTableGrantOptions`), the `fromIcebergTableAttributes(...)` import factory, and `creationOrderFieldIds(columns)` (Python: `creation_order_field_ids`), which returns a map from field path to the id Glue gives that field in a new table; a name containing `.` or a backquote appears in backquotes.\n- **`IcebergSchemaHistory`** — `validateSchemaEvolution(previous, next)` (Python: `validate_schema_evolution`), which returns the unsafe changes from a table's history record to a definition (`IcebergTableSchema`) as `IcebergSchemaViolation`s, each carrying an `IcebergSchemaViolationKind` that names the class of unsafe change; `append`, `toJson` and `fromJson`, which record a definition in, write and read the history file (`IcebergSchemaHistoryFile`, `IcebergTableHistory`, `IcebergFieldHistory`, `IcebergPartitionFieldHistory`); and `updateFromCloudAssembly(directory)`, which records every table of a synthesized app. See [Checking changes against a schema history](#checking-changes-against-a-schema-history).\n- **`IcebergType`** — primitive types, the v3 constants `UNKNOWN`, `TIMESTAMP_NS`, `TIMESTAMPTZ_NS`, and `VARIANT`, and the `list` / `map` / `struct` / `decimal` / `fixed` / `geometry(crs?)` / `geography(crs?, algorithm?)` factories. `list` takes an `IcebergListDefinition`, `map` an `IcebergMapDefinition`, and `struct` a list of `IcebergStructFieldDefinition`, each carrying the nested field ids. Renders to the string Glue's `IcebergStructField.type` expects.\n- **`IcebergPartitionTransform`** — identity / `bucket(N)` / `truncate(W)` / year / month / day / hour / void. Each transform validates against the source column type at synth time.\n- **`IcebergDataFormat`** (parquet/orc/avro, default parquet), **`IcebergFormatVersion`** (v1/v2/v3, required — set explicitly per table; Athena cannot query v3 tables), **`IcebergSortDirection`**, **`IcebergNullOrder`**, **`IcebergEdgeAlgorithm`** (`SPHERICAL`, `VINCENTY`, `THOMAS`, `ANDOYER`, `KARNEY`; the second argument of `IcebergType.geography`), plus a `tableProperties` validator that catches misconfigured properties before they leave your machine (wrong codec for the chosen format, `merge-on-read` on a v1 table, non-positive numeric values, …).\n\n## Using `IcebergTable`\n\nA minimal table:\n\n```typescript\nimport {\n Bucket,\n} from 'aws-cdk-lib/aws-s3';\nimport {\n Database,\n} from 'aws-cdk-lib/aws-glue';\nimport {\n IcebergFormatVersion,\n IcebergTable,\n IcebergType,\n} from 'cdk-glue-iceberg-table';\n\nconst bucket = new Bucket(this, 'Warehouse');\n\nconst db = new Database(this, 'Db', {\n databaseName: 'analytics',\n});\n\nnew IcebergTable(this, 'Users', {\n database: db,\n tableName: 'users',\n columns: [\n {\n name: 'user_id',\n type: IcebergType.LONG,\n required: true,\n id: 1,\n },\n {\n name: 'email',\n type: IcebergType.STRING,\n required: true,\n id: 2,\n },\n {\n name: 'signed_up_at',\n type: IcebergType.TIMESTAMPTZ,\n required: true,\n id: 3,\n },\n ],\n location: `s3://${bucket.bucketName}/analytics/users/`,\n formatVersion: IcebergFormatVersion.V2,\n});\n```\n\nEvery top-level column must declare an `id`: a stable, unique,\npositive integer you pick once and never reuse or reassign. Because\nIceberg data files reference fields by id rather than by name, a fixed\nid, declared in creation order when the table is created (below), is\nwhat lets you add, rename, and drop columns across deploys without\ncorrupting old data — see\n[How do I evolve an Iceberg table schema](#how-do-i-evolve-an-iceberg-table-schema-add-rename-or-drop-a-column-in-cloudformation).\nOnce a column is dropped, leave its id retired; never hand it to a new\ncolumn. Nested fields follow the same rule: every struct field takes\nan `id`, every list an `elementId`, and every map a `keyId` and a\n`valueId`. All ids in a schema, top-level and nested, must be distinct\nintegers from 1 to 2147483447.\n\nA new table must declare its ids in creation order. When Glue creates\na table it does not keep the declared ids: it numbers the fields from\n1 in creation order and points the partition spec, sort order and\nidentifier fields at the new ids. An update Glue accepts stores the\ndeclared ids as given, so the first such update of a table created\nwith other ids renumbers its fields; for the update Glue rejects, see\n[Known limitations](#known-limitations). To number a new table, number\nthe top-level columns first, in order, then the nested fields of each\ncolumn in turn (a list's element; a map's key, then its value, then\nthe key's nested fields, then the value's; a struct's fields, then\ntheir nested fields). `IcebergTable.creationOrderFieldIds` returns\nthese ids by field path and ignores the ids in its input:\n\n```typescript\nconst columns = [\n { name: 'id', type: IcebergType.LONG, required: true, id: 1 },\n { name: 'tags', type: IcebergType.list({ element: IcebergType.STRING, elementId: 4 }), id: 2 },\n {\n name: 'attrs',\n type: IcebergType.map({ key: IcebergType.STRING, keyId: 5, value: IcebergType.STRING, valueId: 6 }),\n id: 3,\n },\n];\nIcebergTable.creationOrderFieldIds(columns);\n// { id: 1, tags: 2, attrs: 3, 'tags.element': 4, 'attrs.key': 5, 'attrs.value': 6 }\n```\n\nIds out of creation order are for fields a later deploy adds; see\n[Evolving schema and partitions](#evolving-schema-and-partitions).\n\nA table that exercises most of the surface (partitions, sort order,\nnested types, identifier fields, table properties, removal policy):\n\n```typescript\nimport {\n RemovalPolicy,\n} from 'aws-cdk-lib';\nimport {\n Database,\n} from 'aws-cdk-lib/aws-glue';\nimport {\n IcebergDataFormat,\n IcebergFormatVersion,\n IcebergNullOrder,\n IcebergPartitionTransform,\n IcebergSortDirection,\n IcebergTable,\n IcebergType,\n} from 'cdk-glue-iceberg-table';\n\nnew IcebergTable(this, 'OrdersTable', {\n database: db,\n tableName: 'orders',\n comment: 'Demo Iceberg orders table — exercises partitions, sort order, and merge-on-read.',\n columns: [\n {\n name: 'order_id',\n type: IcebergType.LONG,\n required: true,\n id: 1,\n },\n {\n name: 'customer_id',\n type: IcebergType.LONG,\n required: true,\n id: 2,\n },\n {\n name: 'order_amount',\n type: IcebergType.decimal(12, 2),\n required: true,\n id: 3,\n },\n {\n name: 'currency',\n type: IcebergType.STRING,\n required: true,\n id: 4,\n },\n {\n name: 'placed_at',\n type: IcebergType.TIMESTAMPTZ,\n required: true,\n id: 5,\n },\n {\n name: 'tags',\n type: IcebergType.list({\n element: IcebergType.STRING,\n elementId: 9,\n }),\n id: 6,\n },\n {\n name: 'shipping_address',\n type: IcebergType.struct([\n {\n id: 10,\n name: 'line1',\n type: IcebergType.STRING,\n required: true,\n },\n {\n id: 11,\n name: 'city',\n type: IcebergType.STRING,\n required: true,\n },\n {\n id: 12,\n name: 'country',\n type: IcebergType.STRING,\n required: true,\n },\n {\n id: 13,\n name: 'postal_code',\n type: IcebergType.STRING,\n },\n ]),\n id: 7,\n },\n {\n name: 'metadata',\n type: IcebergType.map({\n key: IcebergType.STRING,\n keyId: 14,\n value: IcebergType.STRING,\n valueId: 15,\n }),\n id: 8,\n },\n ],\n location: `s3://${bucket.bucketName}/analytics/orders/`,\n partitionSpec: [\n {\n sourceColumn: 'placed_at',\n transform: IcebergPartitionTransform.DAY,\n fieldId: 1000,\n },\n {\n sourceColumn: 'customer_id',\n transform: IcebergPartitionTransform.bucket(16),\n fieldId: 1001,\n },\n ],\n sortOrder: [\n {\n sourceColumn: 'placed_at',\n direction: IcebergSortDirection.ASC,\n nullOrder: IcebergNullOrder.NULLS_LAST,\n },\n {\n sourceColumn: 'order_id',\n direction: IcebergSortDirection.ASC,\n },\n ],\n identifierFieldNames: [\n 'order_id',\n ],\n dataFormat: IcebergDataFormat.PARQUET,\n formatVersion: IcebergFormatVersion.V2,\n tableProperties: {\n 'write.parquet.compression-codec': 'zstd',\n 'write.delete.mode': 'merge-on-read',\n 'write.update.mode': 'merge-on-read',\n 'write.merge.mode': 'merge-on-read',\n 'write.target-file-size-bytes': '134217728',\n 'history.expire.min-snapshots-to-keep': '5',\n 'gc.enabled': 'true',\n },\n removalPolicy: RemovalPolicy.DESTROY,\n});\n```\n\nEach partition field also pins a `fieldId`: an integer of 1000 or\nabove (the Iceberg spec reserves lower ids for schema columns), unique\nacross the table's entire partition-spec history. The discipline is\nthe inverse of the column-id rule. A column keeps its id forever; a\npartition field keeps its id only while it stays untouched. Change\nanything about a field — swap `month` for `day`, point it at a\ndifferent source column — and it becomes a *new* field that needs a\nfresh, never-before-used id, while the old id retires with the old\nspec. Reusing a retired id (or reassigning an id to a different field)\nproduces a table that Athena still reads but Spark and Trino reject\nwith `ValidationException: Conflicting partition fields`.\n\n`identifierFieldNames` lists the columns that together identify a row\nand renders as the schema's `identifier-field-ids`. Each one must be a\n`required: true` column (Glue rejects an optional one), and `cdk synth`\nrejects an identifier column of type float, double, list, map, struct,\nunknown, variant, geometry or geography. The construct prefixes each\nidentifier column's `doc` with `(PK) `, so a `doc` you write must not\nstart with `(PK) `; see [Evolving schema and\npartitions](#evolving-schema-and-partitions).\n\nEvery string you pass is a literal string, not a token, and an\nenum-typed one must be a member of its enum; the exceptions are\n`location`, `comment`, table property values, and the `tableName` of\nan imported table.\n\nThe resulting Iceberg `metadata.json` for this table contains every\nfeature you set:\n\n```json\n{\n \"format-version\": 2,\n \"table-uuid\": \"39a948f9-...\",\n \"current-schema-id\": 0,\n \"schemas\": [\n {\n \"schema-id\": 0,\n \"identifier-field-ids\": [1],\n \"fields\": [\n { \"id\": 1, \"name\": \"order_id\", \"required\": true, \"type\": \"long\", \"doc\": \"(PK) \" },\n { \"id\": 2, \"name\": \"customer_id\", \"required\": true, \"type\": \"long\" },\n { \"id\": 3, \"name\": \"order_amount\", \"required\": true, \"type\": \"decimal(12, 2)\" },\n { \"id\": 4, \"name\": \"currency\", \"required\": true, \"type\": \"string\" },\n { \"id\": 5, \"name\": \"placed_at\", \"required\": true, \"type\": \"timestamptz\" },\n { \"id\": 6, \"name\": \"tags\", \"required\": false,\n \"type\": { \"type\": \"list\", \"element-id\": 9, \"element\": \"string\", \"element-required\": false } },\n { \"id\": 7, \"name\": \"shipping_address\", \"required\": false,\n \"type\": { \"type\": \"struct\", \"fields\": [\n { \"id\": 10, \"name\": \"line1\", \"required\": true, \"type\": \"string\" },\n { \"id\": 11, \"name\": \"city\", \"required\": true, \"type\": \"string\" },\n { \"id\": 12, \"name\": \"country\", \"required\": true, \"type\": \"string\" },\n { \"id\": 13, \"name\": \"postal_code\", \"required\": false, \"type\": \"string\" }\n ] } },\n { \"id\": 8, \"name\": \"metadata\", \"required\": false,\n \"type\": { \"type\": \"map\", \"key-id\": 14, \"key\": \"string\", \"value-id\": 15,\n \"value-required\": false, \"value\": \"string\" } }\n ]\n }\n ],\n \"partition-specs\": [\n { \"spec-id\": 0, \"fields\": [\n { \"name\": \"placed_at_day\", \"transform\": \"day\", \"source-id\": 5, \"field-id\": 1000 },\n { \"name\": \"customer_id_bucket\", \"transform\": \"bucket[16]\", \"source-id\": 2, \"field-id\": 1001 }\n ]}\n ],\n \"sort-orders\": [\n { \"order-id\": 1, \"fields\": [\n { \"transform\": \"identity\", \"source-id\": 5, \"direction\": \"asc\", \"null-order\": \"nulls-last\" },\n { \"transform\": \"identity\", \"source-id\": 1, \"direction\": \"asc\", \"null-order\": \"nulls-last\" }\n ]}\n ],\n \"properties\": {\n \"format-version\": \"2\",\n \"write.format.default\": \"parquet\",\n \"write.parquet.compression-codec\": \"zstd\",\n \"write.merge.mode\": \"merge-on-read\",\n \"write.update.mode\": \"merge-on-read\",\n \"write.delete.mode\": \"merge-on-read\",\n \"write.target-file-size-bytes\": \"134217728\",\n \"history.expire.min-snapshots-to-keep\": \"5\",\n \"gc.enabled\": \"true\",\n \"comment\": \"Demo Iceberg orders table — exercises partitions, sort order, and merge-on-read.\"\n }\n}\n```\n\n### Format version 3\n\nSet `formatVersion: IcebergFormatVersion.V3` to create a v3 table. The\nsix v3 types (below) are only accepted on a V3 table, at any nesting\ndepth: inside a struct, as a list element, or as a map key or value.\nSynth fails on a V1 or V2 table that uses one.\n\n```typescript\nimport {\n IcebergEdgeAlgorithm,\n IcebergFormatVersion,\n IcebergTable,\n IcebergType,\n} from 'cdk-glue-iceberg-table';\n\nnew IcebergTable(this, 'Events', {\n database: db,\n tableName: 'events',\n location: `s3://${bucket.bucketName}/analytics/events/`,\n columns: [\n { name: 'occurred_at', type: IcebergType.TIMESTAMP_NS, id: 1 },\n { name: 'payload', type: IcebergType.VARIANT, id: 2 },\n {\n name: 'origin',\n type: IcebergType.geography('OGC:CRS84', IcebergEdgeAlgorithm.SPHERICAL),\n id: 3,\n },\n ],\n formatVersion: IcebergFormatVersion.V3,\n});\n```\n\nThe same table in Python:\n\n```python\nfrom cdk_glue_iceberg_table import (\n IcebergEdgeAlgorithm,\n IcebergFormatVersion,\n IcebergTable,\n IcebergType,\n)\n\nIcebergTable(self, \"Events\",\n database=db,\n table_name=\"events\",\n location=f\"s3://{bucket.bucket_name}/analytics/events/\",\n columns=[\n {\"name\": \"occurred_at\", \"type\": IcebergType.TIMESTAMP_NS, \"id\": 1},\n {\"name\": \"payload\", \"type\": IcebergType.VARIANT, \"id\": 2},\n {\n \"name\": \"origin\",\n \"type\": IcebergType.geography(\"OGC:CRS84\", IcebergEdgeAlgorithm.SPHERICAL),\n \"id\": 3,\n },\n ],\n format_version=IcebergFormatVersion.V3,\n)\n```\n\nThis table has a `timestamp_ns` column; see [Known limitations](#known-limitations)\nbefore reading it from upstream Spark.\n\nThe v3 types, with the rules `cdk synth` enforces:\n\n| Type | Factory | Rendered string | Partition and identifier rules |\n| --- | --- | --- | --- |\n| unknown | `IcebergType.UNKNOWN` | `unknown` | Must be optional, as a column, list element, or map value; never a map key. Partition source only with `void`. Not an identifier field. |\n| timestamp with nanoseconds | `IcebergType.TIMESTAMP_NS` | `timestamp_ns` | `identity`, `year`, `month`, `day`, `hour`, `bucket(N)`, `void`; not `truncate(W)`. Allowed as an identifier field. |\n| timestamptz with nanoseconds | `IcebergType.TIMESTAMPTZ_NS` | `timestamptz_ns` | Same as `timestamp_ns`. |\n| variant | `IcebergType.VARIANT` | `variant` | Never a partition or sort source, `void` included. Not an identifier field. |\n| geometry | `IcebergType.geometry(crs?)` | `geometry`, or `geometry(<crs>)` when a CRS is given | Partition source only with `void`. Not an identifier field. |\n| geography | `IcebergType.geography(crs?, algorithm?)` | `geography`, `geography(<crs>)`, or `geography(<crs>, <algorithm>)` when an algorithm is given, such as `geography(OGC:CRS84, spherical)` | Same as `geometry`. |\n\nA geometry or geography `crs` is an identifier such as `OGC:CRS84` or\n`EPSG:3857`; whitespace, parentheses, braces, and commas are rejected.\nWhen `algorithm` is set without a `crs`, the rendered string spells out\n`OGC:CRS84`.\n\nWhich engines read a v3 table created by the construct:\n\n| Engine | v3 tables | Notes |\n| --- | --- | --- |\n| Spark 4.1.1 + Iceberg 1.11.0 (the integration-test runner) | Yes | Reads and writes tables the construct creates, including deletion vectors, row lineage, `variant` and `unknown`, except tables with a `geometry`, `geography` or nanosecond-timestamp column ([Known limitations](#known-limitations)). |\n| AWS Glue 6.0 | Documented | The [AWS Glue versions](https://docs.aws.amazon.com/glue/latest/dg/release-notes.html) page lists \"Iceberg format version 3 with VARIANT data type, deletion vectors, row lineage tracking, nanosecond timestamps, and geo types\". The integration suites run on Glue 6.0's Spark 4.1.1 and Iceberg 1.11.0 (`scripts/spark/spark-env.sh`); the Glue job runtime itself is not exercised. |\n| Amazon EMR Spark 8.1.0 (Spark 4.1.1, Iceberg 1.11.0-amzn-0) | Documented | The [emr-spark-8.1.0 release notes](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-spark810-release.html) state \"Amazon EMR Spark 8.1.0 extends Iceberg v3 spec support for Spark workloads\". The integration suites do not run on EMR 8.1. |\n| Athena SQL | No | The [Athena Iceberg page](https://docs.aws.amazon.com/athena/latest/ug/querying-iceberg.html) states \"Athena only creates and operates on Iceberg v2 tables.\" The v2 integration suites also run through Athena (see [Does it work with Athena and Lake Formation?](#does-it-work-with-athena-and-lake-formation)); no v3 table is queried through Athena. |\n\n### Granting access\n\n```typescript\nconst table = new IcebergTable(this, 'Orders', {\n // ...\n encryptionKey: bucketKey, // the key the table's bucket encrypts objects with\n});\ntable.grantRead(role);\ntable.grantWrite(role);\ntable.grantReadWrite(role, {\n catalogEncryptionKey: catalogKey, // the Data Catalog's SSE-KMS key\n lakeFormationDataAccess: true, // Athena on a location registered with Lake Formation\n});\n```\n\nEach method issues these statements and no others:\n\n| Statement | `grantRead` | `grantWrite` | `grantReadWrite` | Resource |\n| --- | --- | --- | --- | --- |\n| Glue | `glue:BatchGetPartition`, `glue:GetDatabase`, `glue:GetPartition`, `glue:GetPartitions`, `glue:GetTable`, `glue:GetTables`, `glue:GetTableVersion`, `glue:GetTableVersions` | `glue:BatchCreatePartition`, `glue:BatchDeletePartition`, `glue:CreatePartition`, `glue:DeletePartition`, `glue:UpdatePartition`, `glue:UpdateTable` | both lists | `arn:<partition>:glue:<region>:<account>:catalog`, the database ARN and the table ARN |\n| S3 list | `s3:ListBucket` | none | `s3:ListBucket` | the bucket, with condition `StringLike` `s3:prefix` = `<prefix>*` or `<prefix>` |\n| S3 bucket | `s3:GetBucketLocation` | `s3:ListBucketMultipartUploads` | both | the bucket |\n| S3 objects | `s3:GetObject` | `s3:PutObject`, `s3:DeleteObject`, `s3:AbortMultipartUpload`, `s3:ListMultipartUploadParts` | both lists | `<bucket>/<prefix>*` |\n| Table key, when `encryptionKey` is set | `kms:Decrypt` | `kms:Decrypt`, `kms:GenerateDataKey` | `kms:Decrypt`, `kms:GenerateDataKey` | the key |\n| Catalog key, when `catalogEncryptionKey` is passed | `kms:Decrypt` | `kms:Decrypt`, `kms:Encrypt`, `kms:GenerateDataKey` | `kms:Decrypt`, `kms:Encrypt`, `kms:GenerateDataKey` | the key |\n| Lake Formation, when `lakeFormationDataAccess` is `true` | `lakeformation:GetDataAccess` | `lakeformation:GetDataAccess` | `lakeformation:GetDataAccess` | `*` |\n\nThe KMS statements are on the whole key: `IKey.grant` adds no\nencryption-context condition, so a key shared with other data (a bucket\nor lake key, the catalog key) is covered for everything it encrypts,\nnot only this table.\n\n`lakeformation:GetDataAccess` is the one statement on `*`, because Lake\nFormation supports no resource for it. It is issued only with\n`lakeFormationDataAccess: true`; with it, Lake Formation vends\ncredentials for every table the principal holds Lake Formation\npermissions on, which includes tables open to `IAM_ALLOWED_PRINCIPALS`.\n\nPass `catalogEncryptionKey` when the Data Catalog is encrypted with a\ncustomer managed key.\n\nLake Formation permissions themselves (`AWS::LakeFormation::Permissions`)\nare yours to create:\n\n```typescript\nimport { CfnPermissions } from 'aws-cdk-lib/aws-lakeformation';\n\nnew CfnPermissions(this, 'OrdersReader', {\n dataLakePrincipal: { dataLakePrincipalIdentifier: role.roleArn },\n resource: {\n tableResource: {\n catalogId: this.account,\n databaseName: table.database.databaseName,\n name: table.tableName,\n },\n },\n permissions: ['SELECT', 'DESCRIBE'],\n});\n```\n\nAdd `INSERT`, `DELETE` and `ALTER` for a principal that writes.\n\nIn Python the new names are `encryption_key`, and the grant options are\nthe keyword arguments `lake_formation_data_access` and\n`catalog_encryption_key`.\n\nUpgrading from a version before 0.17.0: existing `grantRead`,\n`grantWrite` and `grantReadWrite` policies change with no code edit.\nThe Glue statement names the catalog and database ARNs as well as the\ntable, and read grants add `glue:GetDatabase`. Nothing for KMS or Lake\nFormation is issued unless the new prop or options are passed.\n\n### Importing an existing table\n\n```typescript\nconst existing = IcebergTable.fromIcebergTableAttributes(this, 'Orders', {\n database: db,\n tableName: 'orders',\n location: 's3://my-bucket/analytics/orders/',\n encryptionKey: bucketKey, // optional; grants then cover the key\n});\nexisting.grantRead(role);\n```\n\n### Evolving schema and partitions\n\nChange the `columns` array (or `partitionSpec`) and run `cdk deploy`\nagain. The construct passes the new schema to Glue's `UpdateTable`,\nwhich writes a new `metadata.json` with a new `schema-id`; existing\ndata files stay readable because each column's `id` is pinned to the\nid the table holds and never reused. Adds, renames (same `id`, new\n`name`), and drops all flow through `cdk deploy` alone — no\nout-of-band SQL DDL.\n\nNested fields evolve the same way. Each struct field, list element,\nmap key, and map value keeps the id you gave it (the rule is under\n[Using `IcebergTable`](#using-icebergtable)), so adding a column or a\nstruct field anywhere in the schema leaves every other id unchanged. A\nnew nested field takes an id no field of the table has ever used:\n\n```typescript\ntype: IcebergType.struct([\n { id: 10, name: 'line1', type: IcebergType.STRING },\n { id: 16, name: 'line2', type: IcebergType.STRING }, // new field, never-used id\n { id: 11, name: 'city', type: IcebergType.STRING },\n]),\n```\n\nSuch an id is out of creation order, which is expected once a table\nhas evolved: creation order applies only to the ids a table is created\nwith (see [Using `IcebergTable`](#using-icebergtable)).\n\nUpgrading from a version before 0.12.0, which numbered nested fields\nitself: declare the ids the table's current `metadata.json` holds,\ntop-level and nested (each field `id`, `element-id`, `key-id` and\n`value-id`), or the next deploy renumbers the fields that differ and\nexisting data files read under the wrong field. A nested type object\nshared by two columns now fails synth with a duplicate id; give each\ncolumn its own nested type with its own ids. The list element and map\nvalue nullability default also changed: `elementRequired` and\n`valueRequired` now default to `false`. Earlier versions made list\nelements required by default and map values required unless the third\nargument of `map` was `false`; set `elementRequired: true` or\n`valueRequired: true` wherever the deployed schema has\n`\"element-required\": true` or `\"value-required\": true`.\n\nGlue's `UpdateTable` reuses an earlier schema whose fields (name,\ntype, `required`, `doc`) match the request, together with that\nschema's `identifier-field-ids`. The construct therefore prefixes the\n`doc` of every identifier column with `(PK) ` (just `(PK) ` when the\ncolumn has no `doc`), shown as the column comment, so every\nidentifier change is a field change. On a table whose schema history\nwas written with the marker, identifier changes flow through `cdk\ndeploy` like column changes.\n\nPartition evolution flows the same way, with one extra rule on\n`fieldId`: a changed partition field is a new partition field. To move\na table from `month(placed_at)` to `day(placed_at)`, drop the month\nentry and add a day entry under a fresh `fieldId` — never recycle the\nmonth field's id:\n\n```typescript\npartitionSpec: [\n // was: { sourceColumn: 'placed_at', transform: IcebergPartitionTransform.MONTH, fieldId: 1000 },\n {\n sourceColumn: 'placed_at',\n transform: IcebergPartitionTransform.DAY,\n fieldId: 1001,\n },\n],\n```\n\nOld data files written under the month spec stay readable; new writes\npartition by day. Reusing `1000` for the day field instead corrupts\nthe spec history for strict engines (Spark, Trino) while Athena keeps\nworking — the failure only surfaces at Spark runtime.\n\nA changed `sortOrder` also flows through `cdk deploy`. Glue adds it to\n`sort-orders` under the next `order-id` and points\n`default-sort-order-id` at it; the earlier orders stay in the list.\nA change to `tableProperties` alone writes new metadata that keeps the\nsame `current-schema-id`, partition spec and sort order.\n\n### Checking changes against a schema history\n\nThe construct never reads the deployed table, so on its own it cannot\ntell that an id belonged to a field dropped two deploys ago. A schema\nhistory file committed beside the app gives synth that record without\nan AWS call. Point `schemaHistoryFile` at the history file of the\ntable's database:\n\n```typescript\nnew IcebergTable(this, 'Orders', {\n // ...\n schemaHistoryFile: path.join(__dirname, 'analytics.schema-history.json'),\n});\n```\n\nA relative path resolves against the working directory, which is the\ndirectory holding `cdk.json` when the `cdk` CLI runs the app. Create\nthe file once with the content `{\"tables\": []}`. Records are keyed by\ntable name, so give each Glue database its own file.\n\nEvery synth (`cdk synth`, `cdk diff`, `cdk deploy`, and the CI job\nthat runs one) then compares each table with its record and fails,\nlisting every problem, when the definition:\n\n- gives a column or nested field id in the record to a different\n field: a dropped field's id, or the id of a field whose\n path is still in the definition under another id;\n- keeps a field's path but changes its id, as in the nested ids\n `4, 5, 6` becoming `5, 6, 7` after a column is added;\n- changes a field's type, except `int` to `long`, `float` to `double`,\n and a wider decimal precision at the same scale;\n- makes an optional field required;\n- drops a column that any recorded partition spec was sourced from;\n- keeps a partition `fieldId` with a different source column or\n transform.\n\nFields are identified by id, so a rename passes. A table with no\nrecord passes. Synth never writes the file; record a change once it\npasses synth, and commit the file with the change:\n\n```bash\ncdk synth --quiet\nnode -e \"console.log(require('cdk-glue-iceberg-table').IcebergSchemaHistory.updateFromCloudAssembly('cdk.out'))\"\n```\n\nFrom a Python app, the second command is:\n\n```bash\npython -c \"from cdk_glue_iceberg_table import IcebergSchemaHistory; print(IcebergSchemaHistory.update_from_cloud_assembly('cdk.out'))\"\n```\n\n`updateFromCloudAssembly` records every table of the assembly that\nsets `schemaHistoryFile` in that file and returns the files it wrote.\nThe record keeps every id the table has used: a dropped field stays\nwith `\"dropped\": true`, and a partition field stays after it leaves\nthe spec. The file must already exist, and nothing is written when any\ntable is an unsafe change. A column replaced under the same name needs\ntwo recorded changes: drop it, then add it with a new id.\n\n`IcebergSchemaHistory.validateSchemaEvolution(previous, next)` runs\nthe same checks on one table record without the prop, and\n`IcebergSchemaHistory.append`, `toJson` and `fromJson` record a\ndefinition in, write and read the file format.\n\n### Inserting and querying\n\n```sql\n-- INSERT into the orders table\nINSERT INTO sample_database.orders VALUES\n (1001, 5001, DECIMAL '149.99', 'USD',\n TIMESTAMP '2026-05-20 09:15:00 UTC',\n ARRAY['holiday-promo','first-order'],\n CAST(ROW('1 Infinite Loop','Cupertino','US','95014')\n AS ROW(line1 VARCHAR,city VARCHAR,country VARCHAR,postal_code VARCHAR)),\n MAP(ARRAY['channel','utm'], ARRAY['web','google'])),\n -- ... more rows\n;\n\n-- merge-on-read DELETE (only legal because we chose v2 + merge-on-read mode)\nDELETE FROM sample_database.orders WHERE order_id = 1003;\n\n-- merge-on-read UPDATE\nUPDATE sample_database.orders SET currency = 'GBP' WHERE customer_id = 5002;\n\n-- SELECT\nSELECT customer_id, SUM(order_amount) AS total\n FROM sample_database.orders\n GROUP BY 1\n ORDER BY 2 DESC;\n```\n\n## Two footguns the construct prevents\n\n### Footgun #1 — schema under `storageDescriptor.columns`\n\nThe CREATE succeeds but the first UPDATE silently strips\n`table_type=ICEBERG` from the table's Glue parameters, and Athena\nqueries after that fail with `HIVE_UNSUPPORTED_FORMAT`.\n\n```typescript\n// DON'T DO THIS — what most StackOverflow / re:Post examples show\nnew CfnTable(this, 'OrdersBad', {\n catalogId: this.account,\n databaseName: 'analytics',\n tableInput: {\n name: 'orders',\n tableType: 'EXTERNAL_TABLE',\n parameters: {\n table_type: 'ICEBERG',\n },\n storageDescriptor: {\n location: 's3://.../orders/',\n columns: [\n /* ... */\n ],\n },\n },\n openTableFormatInput: {\n icebergInput: {\n metadataOperation: 'CREATE',\n version: '2',\n },\n },\n});\n```\n\n`IcebergTable` instead always emits schema/partitions/sort/properties\nunder `openTableFormatInput.icebergInput.icebergTableInput`, never\nunder `storageDescriptor`.\n\n### Footgun #2 — `tableInput` co-present with `openTableFormatInput`\n\nEven setting just `tableInput: { name: 'foo' }` next to\n`openTableFormatInput` returns\n`\"Table metadata is expected only via TableInput or via IcebergTableInputProperties inside OpenTableFormatInput\"`.\nThe construct never emits `tableInput`; the table-level comment goes\ninto `tableProperties['comment']`, which lives inside\n`icebergTableInput.properties`.\n\n(There is a third footgun, field-id reuse after a column drop, that\nthe construct prevents only with a [schema history\nfile](#checking-changes-against-a-schema-history). See the next\nsection.)\n\n## Known limitations\n\n- **Creation order is not checked.** The construct cannot tell at synth whether a table is new or already deployed, so it accepts a new table whose ids are not in creation order (the rule is under [Using `IcebergTable`](#using-icebergtable)). When the first update of such a table changes the id of a column an identity partition is sourced from, Glue rejects the update with `Cannot create identity partition sourced from different field in schema` and the CloudFormation rollback fails the same way, leaving the stack in `UPDATE_ROLLBACK_FAILED`.\n- **Field-id reuse across deploys is detected only with a schema history file.** This applies to nested ids (struct field, list element, map key and value) as well as column ids. If you drop a column with `id = 5` and then add a different column with `id = 5` in a later deploy, Glue accepts the UPDATE and Iceberg's metadata silently violates the \"never reuse a retired id\" invariant. Readers projecting old snapshots will surface deleted data under the new field's name. The construct enforces uniqueness **within one deploy** (`duplicate field id N` validator) and never reads the live table state; across deploys, only a [schema history file](#checking-changes-against-a-schema-history) catches reuse. Without it, treat dropped ids as retired forever.\n- **Partition field-id reuse across deploys is detected only with a schema history file.** The same live-state blindness applies to partition `fieldId`s: the construct validates them within one deploy (integer >= 1000, unique in the spec), and only a [schema history file](#checking-changes-against-a-schema-history) tells it that the id you pinned already appeared in an earlier spec of the deployed table. The invariant partition ids must uphold is stricter than the column one — unique across the table's **entire spec history**, so a changed field (different transform or source column) must take a fresh id rather than keep its old one. Violate it and strict engines (Spark, Trino) reject the table with `Conflicting partition fields` while Athena keeps answering, masking the break until Spark runtime. Without the history file, treat every id that has ever appeared in any spec as retired, and allocate new fields the next never-used id. A partition change needs a new source column or transform; Glue ignores a `fieldId`-only change.\n- **`last-partition-id` is written by Glue, not by the construct.** The construct supplies the spec's field ids; Glue's `UpdateTable` computes the table's `last-partition-id` counter when it writes the new metadata. The repo's integration test asserts the counter keeps up with the highest supplied field id after a partition evolution, but engines that later evolve the spec themselves (e.g. Spark `ALTER TABLE … ADD PARTITION FIELD`) allocate from that counter — if you mix CDK-managed and engine-managed partition evolution, verify the counter in `metadata.json` before trusting engine-side changes.\n- **A rolled-back deploy leaves its schema in the table's history.** When a deploy that adds a column updates the table and then fails on another resource, the stack ends in `UPDATE_ROLLBACK_COMPLETE` and `current-schema-id` is back to its earlier value, so the column is gone and the rows read as before. The schema that held the column stays in `schemas`, and `last-column-id` stays at the column's id. A clean redeploy of the same change makes that schema current again without adding a schema. Treat an id from a rolled-back deploy as used: give it only to the column that deploy added.\n- **Removing the last identifier from a table created with identifiers before 0.11.0 can bring the old ids back.** That table's history holds an unmarked schema with ids, and Glue reuses it when the rendered fields match it again. Change a column `doc` in the same deploy that removes the last identifier.\n- **The schema history check covers only the changes it lists.** It does not see a change an engine makes with `ALTER TABLE` (Spark, Athena), whose ids the file never records, or a deploy whose definition was not recorded in the file. It does not check sort order or identifier field changes or report an added required field, top level or nested, and it treats a field moved into another struct under its id as a rename. It reports the format v3 promotions `unknown` to any type and `date` to `timestamp` or `timestamp_ns` as type changes.\n- **CREATE-only metadata operation.** The CFN `IcebergInput.metadataOperation` only accepts `CREATE`; the construct always emits that. Subsequent deploys use Glue's normal `UpdateTable` path, which writes new Iceberg metadata in-place.\n- **Format version is immutable after CREATE.** Glue ignores a V2 to V3 `formatVersion` change, though `properties.format-version` then reads `3`. Keep `formatVersion` at the table's real version, or destroy + recreate the table to change it. An engine can upgrade a v2 table to v3 in place with `ALTER TABLE ... SET TBLPROPERTIES ('format-version' = '3')`; after that, set `formatVersion` to `V3` so the next deploy declares the version the table already has.\n- **`merge-on-read` requires v2 or later.** The construct rejects `write.{delete,update,merge}.mode = merge-on-read` on a v1 table at synth time.\n- **Column defaults are not available.** Iceberg v3 `initial-default` and `write-default` cannot be declared through CloudFormation: the `AWS::Glue::Table` resource schema has no `InitialDefault` or `WriteDefault` property. Revisit when that schema gains the two properties.\n- **Nanosecond timestamps are catalog-only for Spark 4.1.1 with Iceberg 1.11.0.** In [`TypeToSparkType`](https://github.com/apache/iceberg/blob/apache-iceberg-1.11.0/spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/TypeToSparkType.java) at the `apache-iceberg-1.11.0` tag, `primitive()` has no case for the `TIMESTAMP_NANO` type id, so a table with a `timestamp_ns` or `timestamptz_ns` column reaches the `Cannot convert unsupported type to Spark` error. The integration suite asserts these columns from `metadata.json` only.\n- **Geometry and geography columns are catalog-only for Spark 4.1.1 with Iceberg 1.11.0, the versions AWS Glue 6.0 ships.** The first Spark read of a table holding a `geography` and a `geometry` column failed with `UnsupportedOperationException: Cannot convert unsupported type to Spark: geography(OGC:CRS84, spherical)` on those versions. [`TypeToSparkType`](https://github.com/apache/iceberg/blob/apache-iceberg-1.11.0/spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/TypeToSparkType.java) at the `apache-iceberg-1.11.0` tag has no conversion for `geometry` either. The integration suite deploys these columns on a table no Spark job opens and asserts them from `metadata.json` only.\n- **Athena DDL features that don't surface through CFN** (e.g. `ALTER TABLE … SET LOCATION`, `bucketed_by` / `bucket_count` Hive clauses) are not exposed. Use `IcebergPartitionTransform.bucket(N)` instead of Hive bucketing.\n- **Dropping a partition column requires a `void` intermediate per the Iceberg spec**, and the CFN `OpenTableFormatInput` cannot express that. The construct accepts the change unless a [schema history file](#checking-changes-against-a-schema-history) records the column as a partition source, and Athena queries against the result will fail with `Type cannot be null`. The safe pattern is to drop partitions that source from a column while keeping that column in the schema, and only drop a column once it is no longer partitioning anything.\n\n## FAQ\n\n### How do I create an Apache Iceberg table in AWS CDK?\n\nInstall `cdk-glue-iceberg-table`, then declare an `IcebergTable` with a\ndatabase, a column list, and an S3 `location` — see [Use](#use).\n`cdk deploy` creates the Glue Data Catalog table and writes the\nIceberg `metadata.json` under your S3 prefix. No custom resource or\nLambda is involved; it is a plain `AWS::Glue::Table` in your\nCloudFormation template.\n\n### How do I evolve an Iceberg table schema (add, rename, or drop a column) in CloudFormation?\n\nChange the `columns` array and run `cdk deploy` again. The construct\npasses the new schema to Glue's `UpdateTable`, which writes a new\n`metadata.json` with a new `schema-id`; existing data files stay\nreadable because each column's `id` is pinned to the id the table\nholds and never reused.\nPartition changes work the same way, except a changed partition field\ntakes a fresh `fieldId` instead of keeping its old one. See [Evolving\nschema and partitions](#evolving-schema-and-partitions).\n\n### Does CloudFormation support Iceberg tables natively?\n\nYes, through `AWS::Glue::Table` with `OpenTableFormatInput.IcebergInput`,\ndocumented by AWS in [December 2025](https://aws.amazon.com/blogs/big-data/create-and-update-apache-iceberg-tables-with-partitions-in-the-aws-glue-data-catalog-using-the-aws-sdk-and-aws-cloudformation).\nThe catch is that the raw shape corrupts the table on the first\n`Update` if you place schema under `storageDescriptor.columns` or set\n`tableInput` alongside `openTableFormatInput`. This construct only ever\nemits the safe shape and gives you no way to express the unsafe ones.\nSee [Two footguns the construct prevents](#two-footguns-the-construct-prevents).\n\n### What is the difference between cdk-glue-iceberg-table and a raw CfnTable?\n\nA raw `CfnTable` makes you hand-write the `OpenTableFormatInput` JSON\nand own both silent-corruption footguns. `cdk-glue-iceberg-table` gives\nyou a typed `IcebergType` / `IcebergPartitionTransform` API,\nsynth-time validation (partition transforms checked against column\ntypes, format/version mismatches caught before deploy), pinned field\nIDs for safe evolution (declared in creation order for a new table),\nand `grantRead` / `grantWrite` helpers. See\n[How it compares](#how-it-compares).\n\n### How do I create a partitioned Iceberg table in CDK?\n\nPass a `partitionSpec` of `IcebergPartitionTransform` entries —\n`identity`, `bucket(N)`, `truncate(W)`, `year`, `month`, `day`, `hour`,\nor `void` — each pinned to a `fieldId` of 1000 or above. Transforms are\nvalidated against their source column's type at synth time. See\n[Using `IcebergTable`](#using-icebergtable).\n\n### Does it work with Athena and Lake Formation?\n\nYes for v2 tables, no for v3 (see the engine matrix in [Format\nversion 3](#format-version-3)). The demo app in the\n[`arceus`](https://github.com/ksco92/arceus) repo registers its tables\nwith Lake Formation, and its v2 integration suites query them through\nAthena as well as Spark, on the same tables:\n\n- merge-on-read `INSERT`, `UPDATE`, `DELETE` and `MERGE INTO`, time\n travel (`FOR VERSION AS OF` / `FOR TIMESTAMP AS OF`), `OPTIMIZE ...\n REWRITE DATA USING BIN_PACK`, and `VACUUM`;\n- a read after every schema, partition, identifier and nested-field\n evolution step;\n- the `(PK) ` comment on identifier columns, read from\n `information_schema.columns`;\n- rows written by Spark read through Athena, and rows written by Athena\n read through Spark;\n- reads and writes through Spark and Athena as roles whose table\n permissions come from `grantRead` and `grantReadWrite`, and a denied\n write as the `grantRead` role.\n\nThe suites grant the querying principal `SELECT`, `INSERT`, `DELETE`,\n`ALTER` and `DESCRIBE` through Lake Formation. See [Granting access](#granting-access).\n\n### Can I use Iceberg v2 merge-on-read (row-level UPDATE and DELETE)?\n\nYes — set `formatVersion: IcebergFormatVersion.V2` and the\n`write.{delete,update,merge}.mode = merge-on-read` table properties.\nThe construct rejects merge-on-read on a v1 table at synth time.\n\n### Can I create an Iceberg v3 table?\n\nYes. Set `formatVersion: IcebergFormatVersion.V3`; see [Format\nversion 3](#format-version-3) for the types, the engine matrix and the\nlimits.\n\n## Contributing\n\nDevelopment, the monorepo layout, and the demo app live in [CONTRIBUTING.md](https://github.com/ksco92/arceus/blob/main/CONTRIBUTING.md).\n\n## License\n\n[MIT](https://github.com/ksco92/arceus/blob/main/LICENSE).\n"
|
|
9755
9755
|
},
|
|
9756
9756
|
"repository": {
|
|
9757
9757
|
"directory": "packages/cdk-glue-iceberg-table",
|
|
@@ -9779,7 +9779,7 @@
|
|
|
9779
9779
|
"kind": "interface",
|
|
9780
9780
|
"locationInModule": {
|
|
9781
9781
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9782
|
-
"line":
|
|
9782
|
+
"line": 245
|
|
9783
9783
|
},
|
|
9784
9784
|
"methods": [
|
|
9785
9785
|
{
|
|
@@ -9790,7 +9790,7 @@
|
|
|
9790
9790
|
},
|
|
9791
9791
|
"locationInModule": {
|
|
9792
9792
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9793
|
-
"line":
|
|
9793
|
+
"line": 262
|
|
9794
9794
|
},
|
|
9795
9795
|
"name": "grantRead",
|
|
9796
9796
|
"parameters": [
|
|
@@ -9799,6 +9799,13 @@
|
|
|
9799
9799
|
"type": {
|
|
9800
9800
|
"fqn": "aws-cdk-lib.aws_iam.IGrantable"
|
|
9801
9801
|
}
|
|
9802
|
+
},
|
|
9803
|
+
{
|
|
9804
|
+
"name": "options",
|
|
9805
|
+
"optional": true,
|
|
9806
|
+
"type": {
|
|
9807
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableGrantOptions"
|
|
9808
|
+
}
|
|
9802
9809
|
}
|
|
9803
9810
|
],
|
|
9804
9811
|
"returns": {
|
|
@@ -9815,7 +9822,7 @@
|
|
|
9815
9822
|
},
|
|
9816
9823
|
"locationInModule": {
|
|
9817
9824
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9818
|
-
"line":
|
|
9825
|
+
"line": 268
|
|
9819
9826
|
},
|
|
9820
9827
|
"name": "grantReadWrite",
|
|
9821
9828
|
"parameters": [
|
|
@@ -9824,6 +9831,13 @@
|
|
|
9824
9831
|
"type": {
|
|
9825
9832
|
"fqn": "aws-cdk-lib.aws_iam.IGrantable"
|
|
9826
9833
|
}
|
|
9834
|
+
},
|
|
9835
|
+
{
|
|
9836
|
+
"name": "options",
|
|
9837
|
+
"optional": true,
|
|
9838
|
+
"type": {
|
|
9839
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableGrantOptions"
|
|
9840
|
+
}
|
|
9827
9841
|
}
|
|
9828
9842
|
],
|
|
9829
9843
|
"returns": {
|
|
@@ -9840,7 +9854,7 @@
|
|
|
9840
9854
|
},
|
|
9841
9855
|
"locationInModule": {
|
|
9842
9856
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9843
|
-
"line":
|
|
9857
|
+
"line": 265
|
|
9844
9858
|
},
|
|
9845
9859
|
"name": "grantWrite",
|
|
9846
9860
|
"parameters": [
|
|
@@ -9849,6 +9863,13 @@
|
|
|
9849
9863
|
"type": {
|
|
9850
9864
|
"fqn": "aws-cdk-lib.aws_iam.IGrantable"
|
|
9851
9865
|
}
|
|
9866
|
+
},
|
|
9867
|
+
{
|
|
9868
|
+
"name": "options",
|
|
9869
|
+
"optional": true,
|
|
9870
|
+
"type": {
|
|
9871
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableGrantOptions"
|
|
9872
|
+
}
|
|
9852
9873
|
}
|
|
9853
9874
|
],
|
|
9854
9875
|
"returns": {
|
|
@@ -9869,7 +9890,7 @@
|
|
|
9869
9890
|
"immutable": true,
|
|
9870
9891
|
"locationInModule": {
|
|
9871
9892
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9872
|
-
"line":
|
|
9893
|
+
"line": 253
|
|
9873
9894
|
},
|
|
9874
9895
|
"name": "database",
|
|
9875
9896
|
"type": {
|
|
@@ -9885,7 +9906,7 @@
|
|
|
9885
9906
|
"immutable": true,
|
|
9886
9907
|
"locationInModule": {
|
|
9887
9908
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9888
|
-
"line":
|
|
9909
|
+
"line": 256
|
|
9889
9910
|
},
|
|
9890
9911
|
"name": "location",
|
|
9891
9912
|
"type": {
|
|
@@ -9901,7 +9922,7 @@
|
|
|
9901
9922
|
"immutable": true,
|
|
9902
9923
|
"locationInModule": {
|
|
9903
9924
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9904
|
-
"line":
|
|
9925
|
+
"line": 247
|
|
9905
9926
|
},
|
|
9906
9927
|
"name": "tableArn",
|
|
9907
9928
|
"type": {
|
|
@@ -9917,12 +9938,29 @@
|
|
|
9917
9938
|
"immutable": true,
|
|
9918
9939
|
"locationInModule": {
|
|
9919
9940
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9920
|
-
"line":
|
|
9941
|
+
"line": 250
|
|
9921
9942
|
},
|
|
9922
9943
|
"name": "tableName",
|
|
9923
9944
|
"type": {
|
|
9924
9945
|
"primitive": "string"
|
|
9925
9946
|
}
|
|
9947
|
+
},
|
|
9948
|
+
{
|
|
9949
|
+
"abstract": true,
|
|
9950
|
+
"docs": {
|
|
9951
|
+
"stability": "experimental",
|
|
9952
|
+
"summary": "KMS key the table's objects are encrypted with, when known."
|
|
9953
|
+
},
|
|
9954
|
+
"immutable": true,
|
|
9955
|
+
"locationInModule": {
|
|
9956
|
+
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9957
|
+
"line": 259
|
|
9958
|
+
},
|
|
9959
|
+
"name": "encryptionKey",
|
|
9960
|
+
"optional": true,
|
|
9961
|
+
"type": {
|
|
9962
|
+
"fqn": "aws-cdk-lib.aws_kms.IKey"
|
|
9963
|
+
}
|
|
9926
9964
|
}
|
|
9927
9965
|
],
|
|
9928
9966
|
"symbolId": "lib/iceberg/iceberg-table:IIcebergTable"
|
|
@@ -9938,7 +9976,7 @@
|
|
|
9938
9976
|
"kind": "interface",
|
|
9939
9977
|
"locationInModule": {
|
|
9940
9978
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9941
|
-
"line":
|
|
9979
|
+
"line": 89
|
|
9942
9980
|
},
|
|
9943
9981
|
"name": "IcebergColumn",
|
|
9944
9982
|
"properties": [
|
|
@@ -9952,7 +9990,7 @@
|
|
|
9952
9990
|
"immutable": true,
|
|
9953
9991
|
"locationInModule": {
|
|
9954
9992
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9955
|
-
"line":
|
|
9993
|
+
"line": 110
|
|
9956
9994
|
},
|
|
9957
9995
|
"name": "id",
|
|
9958
9996
|
"type": {
|
|
@@ -9968,7 +10006,7 @@
|
|
|
9968
10006
|
"immutable": true,
|
|
9969
10007
|
"locationInModule": {
|
|
9970
10008
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9971
|
-
"line":
|
|
10009
|
+
"line": 91
|
|
9972
10010
|
},
|
|
9973
10011
|
"name": "name",
|
|
9974
10012
|
"type": {
|
|
@@ -9984,7 +10022,7 @@
|
|
|
9984
10022
|
"immutable": true,
|
|
9985
10023
|
"locationInModule": {
|
|
9986
10024
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9987
|
-
"line":
|
|
10025
|
+
"line": 94
|
|
9988
10026
|
},
|
|
9989
10027
|
"name": "type",
|
|
9990
10028
|
"type": {
|
|
@@ -10001,7 +10039,7 @@
|
|
|
10001
10039
|
"immutable": true,
|
|
10002
10040
|
"locationInModule": {
|
|
10003
10041
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10004
|
-
"line":
|
|
10042
|
+
"line": 103
|
|
10005
10043
|
},
|
|
10006
10044
|
"name": "doc",
|
|
10007
10045
|
"optional": true,
|
|
@@ -10019,7 +10057,7 @@
|
|
|
10019
10057
|
"immutable": true,
|
|
10020
10058
|
"locationInModule": {
|
|
10021
10059
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10022
|
-
"line":
|
|
10060
|
+
"line": 100
|
|
10023
10061
|
},
|
|
10024
10062
|
"name": "required",
|
|
10025
10063
|
"optional": true,
|
|
@@ -10115,6 +10153,105 @@
|
|
|
10115
10153
|
"name": "IcebergEdgeAlgorithm",
|
|
10116
10154
|
"symbolId": "lib/iceberg/iceberg-type:IcebergEdgeAlgorithm"
|
|
10117
10155
|
},
|
|
10156
|
+
"cdk-glue-iceberg-table.IcebergFieldHistory": {
|
|
10157
|
+
"assembly": "cdk-glue-iceberg-table",
|
|
10158
|
+
"datatype": true,
|
|
10159
|
+
"docs": {
|
|
10160
|
+
"stability": "experimental",
|
|
10161
|
+
"summary": "One field id a table has used: a top-level column or a nested field."
|
|
10162
|
+
},
|
|
10163
|
+
"fqn": "cdk-glue-iceberg-table.IcebergFieldHistory",
|
|
10164
|
+
"kind": "interface",
|
|
10165
|
+
"locationInModule": {
|
|
10166
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
10167
|
+
"line": 29
|
|
10168
|
+
},
|
|
10169
|
+
"name": "IcebergFieldHistory",
|
|
10170
|
+
"properties": [
|
|
10171
|
+
{
|
|
10172
|
+
"abstract": true,
|
|
10173
|
+
"docs": {
|
|
10174
|
+
"remarks": "Its id stays retired.",
|
|
10175
|
+
"stability": "experimental",
|
|
10176
|
+
"summary": "Whether the field is absent from the latest recorded definition."
|
|
10177
|
+
},
|
|
10178
|
+
"immutable": true,
|
|
10179
|
+
"locationInModule": {
|
|
10180
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
10181
|
+
"line": 43
|
|
10182
|
+
},
|
|
10183
|
+
"name": "dropped",
|
|
10184
|
+
"type": {
|
|
10185
|
+
"primitive": "boolean"
|
|
10186
|
+
}
|
|
10187
|
+
},
|
|
10188
|
+
{
|
|
10189
|
+
"abstract": true,
|
|
10190
|
+
"docs": {
|
|
10191
|
+
"stability": "experimental",
|
|
10192
|
+
"summary": "Iceberg field id."
|
|
10193
|
+
},
|
|
10194
|
+
"immutable": true,
|
|
10195
|
+
"locationInModule": {
|
|
10196
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
10197
|
+
"line": 31
|
|
10198
|
+
},
|
|
10199
|
+
"name": "id",
|
|
10200
|
+
"type": {
|
|
10201
|
+
"primitive": "number"
|
|
10202
|
+
}
|
|
10203
|
+
},
|
|
10204
|
+
{
|
|
10205
|
+
"abstract": true,
|
|
10206
|
+
"docs": {
|
|
10207
|
+
"stability": "experimental",
|
|
10208
|
+
"summary": "Field path when last seen (`addr.city`, `tags.element`, `attrs.key`)."
|
|
10209
|
+
},
|
|
10210
|
+
"immutable": true,
|
|
10211
|
+
"locationInModule": {
|
|
10212
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
10213
|
+
"line": 34
|
|
10214
|
+
},
|
|
10215
|
+
"name": "path",
|
|
10216
|
+
"type": {
|
|
10217
|
+
"primitive": "string"
|
|
10218
|
+
}
|
|
10219
|
+
},
|
|
10220
|
+
{
|
|
10221
|
+
"abstract": true,
|
|
10222
|
+
"docs": {
|
|
10223
|
+
"stability": "experimental",
|
|
10224
|
+
"summary": "Whether the field was required when last seen."
|
|
10225
|
+
},
|
|
10226
|
+
"immutable": true,
|
|
10227
|
+
"locationInModule": {
|
|
10228
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
10229
|
+
"line": 40
|
|
10230
|
+
},
|
|
10231
|
+
"name": "required",
|
|
10232
|
+
"type": {
|
|
10233
|
+
"primitive": "boolean"
|
|
10234
|
+
}
|
|
10235
|
+
},
|
|
10236
|
+
{
|
|
10237
|
+
"abstract": true,
|
|
10238
|
+
"docs": {
|
|
10239
|
+
"stability": "experimental",
|
|
10240
|
+
"summary": "Type when last seen: the primitive type string, or `list`, `map` or `struct`."
|
|
10241
|
+
},
|
|
10242
|
+
"immutable": true,
|
|
10243
|
+
"locationInModule": {
|
|
10244
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
10245
|
+
"line": 37
|
|
10246
|
+
},
|
|
10247
|
+
"name": "type",
|
|
10248
|
+
"type": {
|
|
10249
|
+
"primitive": "string"
|
|
10250
|
+
}
|
|
10251
|
+
}
|
|
10252
|
+
],
|
|
10253
|
+
"symbolId": "lib/iceberg/iceberg-schema-history:IcebergFieldHistory"
|
|
10254
|
+
},
|
|
10118
10255
|
"cdk-glue-iceberg-table.IcebergFormatVersion": {
|
|
10119
10256
|
"assembly": "cdk-glue-iceberg-table",
|
|
10120
10257
|
"docs": {
|
|
@@ -10333,7 +10470,7 @@
|
|
|
10333
10470
|
"kind": "enum",
|
|
10334
10471
|
"locationInModule": {
|
|
10335
10472
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10336
|
-
"line":
|
|
10473
|
+
"line": 76
|
|
10337
10474
|
},
|
|
10338
10475
|
"members": [
|
|
10339
10476
|
{
|
|
@@ -10365,21 +10502,21 @@
|
|
|
10365
10502
|
"kind": "interface",
|
|
10366
10503
|
"locationInModule": {
|
|
10367
10504
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10368
|
-
"line":
|
|
10505
|
+
"line": 114
|
|
10369
10506
|
},
|
|
10370
10507
|
"name": "IcebergPartitionField",
|
|
10371
10508
|
"properties": [
|
|
10372
10509
|
{
|
|
10373
10510
|
"abstract": true,
|
|
10374
10511
|
"docs": {
|
|
10375
|
-
"remarks": "Required: every partition field must\nbe pinned to a stable integer >= 1000 (the Iceberg spec reserves\nids below 1000 for schema columns) that is unique across the\ntable's entire partition-spec history — not just the current\nspec. Iceberg's strict engines (Spark, Trino) reject a table\nwhose spec history carries two different partition fields with\nthe same id.\n\nThe rule is the inverse of the column-id rule: a column keeps\nits id forever, but any change to a partition field — a\ndifferent transform, a different source column — makes it a NEW\nfield that needs a fresh, never-before-used id. Only an\nuntouched field keeps its id across deploys. Once a field is\nchanged or dropped, its id is retired for good; the construct\
|
|
10512
|
+
"remarks": "Required: every partition field must\nbe pinned to a stable integer >= 1000 (the Iceberg spec reserves\nids below 1000 for schema columns) that is unique across the\ntable's entire partition-spec history — not just the current\nspec. Iceberg's strict engines (Spark, Trino) reject a table\nwhose spec history carries two different partition fields with\nthe same id.\n\nThe rule is the inverse of the column-id rule: a column keeps\nits id forever, but any change to a partition field — a\ndifferent transform, a different source column — makes it a NEW\nfield that needs a fresh, never-before-used id. Only an\nuntouched field keeps its id across deploys. Once a field is\nchanged or dropped, its id is retired for good; the construct\nchecks retirement only against a `schemaHistoryFile`.",
|
|
10376
10513
|
"stability": "experimental",
|
|
10377
10514
|
"summary": "Iceberg partition field id."
|
|
10378
10515
|
},
|
|
10379
10516
|
"immutable": true,
|
|
10380
10517
|
"locationInModule": {
|
|
10381
10518
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10382
|
-
"line":
|
|
10519
|
+
"line": 145
|
|
10383
10520
|
},
|
|
10384
10521
|
"name": "fieldId",
|
|
10385
10522
|
"type": {
|
|
@@ -10395,7 +10532,7 @@
|
|
|
10395
10532
|
"immutable": true,
|
|
10396
10533
|
"locationInModule": {
|
|
10397
10534
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10398
|
-
"line":
|
|
10535
|
+
"line": 116
|
|
10399
10536
|
},
|
|
10400
10537
|
"name": "sourceColumn",
|
|
10401
10538
|
"type": {
|
|
@@ -10411,7 +10548,7 @@
|
|
|
10411
10548
|
"immutable": true,
|
|
10412
10549
|
"locationInModule": {
|
|
10413
10550
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10414
|
-
"line":
|
|
10551
|
+
"line": 119
|
|
10415
10552
|
},
|
|
10416
10553
|
"name": "transform",
|
|
10417
10554
|
"type": {
|
|
@@ -10428,7 +10565,7 @@
|
|
|
10428
10565
|
"immutable": true,
|
|
10429
10566
|
"locationInModule": {
|
|
10430
10567
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10431
|
-
"line":
|
|
10568
|
+
"line": 126
|
|
10432
10569
|
},
|
|
10433
10570
|
"name": "name",
|
|
10434
10571
|
"optional": true,
|
|
@@ -10439,6 +10576,88 @@
|
|
|
10439
10576
|
],
|
|
10440
10577
|
"symbolId": "lib/iceberg/iceberg-table:IcebergPartitionField"
|
|
10441
10578
|
},
|
|
10579
|
+
"cdk-glue-iceberg-table.IcebergPartitionFieldHistory": {
|
|
10580
|
+
"assembly": "cdk-glue-iceberg-table",
|
|
10581
|
+
"datatype": true,
|
|
10582
|
+
"docs": {
|
|
10583
|
+
"stability": "experimental",
|
|
10584
|
+
"summary": "One partition field id a table has used in any partition spec."
|
|
10585
|
+
},
|
|
10586
|
+
"fqn": "cdk-glue-iceberg-table.IcebergPartitionFieldHistory",
|
|
10587
|
+
"kind": "interface",
|
|
10588
|
+
"locationInModule": {
|
|
10589
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
10590
|
+
"line": 47
|
|
10591
|
+
},
|
|
10592
|
+
"name": "IcebergPartitionFieldHistory",
|
|
10593
|
+
"properties": [
|
|
10594
|
+
{
|
|
10595
|
+
"abstract": true,
|
|
10596
|
+
"docs": {
|
|
10597
|
+
"stability": "experimental",
|
|
10598
|
+
"summary": "Partition field id."
|
|
10599
|
+
},
|
|
10600
|
+
"immutable": true,
|
|
10601
|
+
"locationInModule": {
|
|
10602
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
10603
|
+
"line": 49
|
|
10604
|
+
},
|
|
10605
|
+
"name": "fieldId",
|
|
10606
|
+
"type": {
|
|
10607
|
+
"primitive": "number"
|
|
10608
|
+
}
|
|
10609
|
+
},
|
|
10610
|
+
{
|
|
10611
|
+
"abstract": true,
|
|
10612
|
+
"docs": {
|
|
10613
|
+
"stability": "experimental",
|
|
10614
|
+
"summary": "Partition field name when last seen."
|
|
10615
|
+
},
|
|
10616
|
+
"immutable": true,
|
|
10617
|
+
"locationInModule": {
|
|
10618
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
10619
|
+
"line": 52
|
|
10620
|
+
},
|
|
10621
|
+
"name": "name",
|
|
10622
|
+
"type": {
|
|
10623
|
+
"primitive": "string"
|
|
10624
|
+
}
|
|
10625
|
+
},
|
|
10626
|
+
{
|
|
10627
|
+
"abstract": true,
|
|
10628
|
+
"docs": {
|
|
10629
|
+
"stability": "experimental",
|
|
10630
|
+
"summary": "Field id of the source column."
|
|
10631
|
+
},
|
|
10632
|
+
"immutable": true,
|
|
10633
|
+
"locationInModule": {
|
|
10634
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
10635
|
+
"line": 55
|
|
10636
|
+
},
|
|
10637
|
+
"name": "sourceId",
|
|
10638
|
+
"type": {
|
|
10639
|
+
"primitive": "number"
|
|
10640
|
+
}
|
|
10641
|
+
},
|
|
10642
|
+
{
|
|
10643
|
+
"abstract": true,
|
|
10644
|
+
"docs": {
|
|
10645
|
+
"stability": "experimental",
|
|
10646
|
+
"summary": "Transform string (`identity`, `bucket[16]`, `day`, ...)."
|
|
10647
|
+
},
|
|
10648
|
+
"immutable": true,
|
|
10649
|
+
"locationInModule": {
|
|
10650
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
10651
|
+
"line": 58
|
|
10652
|
+
},
|
|
10653
|
+
"name": "transform",
|
|
10654
|
+
"type": {
|
|
10655
|
+
"primitive": "string"
|
|
10656
|
+
}
|
|
10657
|
+
}
|
|
10658
|
+
],
|
|
10659
|
+
"symbolId": "lib/iceberg/iceberg-schema-history:IcebergPartitionFieldHistory"
|
|
10660
|
+
},
|
|
10442
10661
|
"cdk-glue-iceberg-table.IcebergPartitionTransform": {
|
|
10443
10662
|
"assembly": "cdk-glue-iceberg-table",
|
|
10444
10663
|
"docs": {
|
|
@@ -11095,62 +11314,413 @@
|
|
|
11095
11314
|
],
|
|
11096
11315
|
"symbolId": "lib/iceberg/iceberg-table-properties:IcebergPropertyKeys"
|
|
11097
11316
|
},
|
|
11098
|
-
"cdk-glue-iceberg-table.
|
|
11317
|
+
"cdk-glue-iceberg-table.IcebergSchemaHistory": {
|
|
11099
11318
|
"assembly": "cdk-glue-iceberg-table",
|
|
11100
11319
|
"docs": {
|
|
11101
11320
|
"stability": "experimental",
|
|
11102
|
-
"summary": "
|
|
11321
|
+
"summary": "Checks and maintains the committed schema history that `IcebergTable` compares a definition against when `schemaHistoryFile` is set."
|
|
11103
11322
|
},
|
|
11104
|
-
"fqn": "cdk-glue-iceberg-table.
|
|
11105
|
-
"
|
|
11323
|
+
"fqn": "cdk-glue-iceberg-table.IcebergSchemaHistory",
|
|
11324
|
+
"initializer": {
|
|
11325
|
+
"docs": {
|
|
11326
|
+
"stability": "experimental"
|
|
11327
|
+
}
|
|
11328
|
+
},
|
|
11329
|
+
"kind": "class",
|
|
11106
11330
|
"locationInModule": {
|
|
11107
|
-
"filename": "lib/iceberg/iceberg-
|
|
11108
|
-
"line":
|
|
11331
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
11332
|
+
"line": 125
|
|
11109
11333
|
},
|
|
11110
|
-
"
|
|
11334
|
+
"methods": [
|
|
11111
11335
|
{
|
|
11112
11336
|
"docs": {
|
|
11337
|
+
"remarks": "ids\nabsent from `next` stay in the record as dropped. Throws if the change is unsafe.",
|
|
11113
11338
|
"stability": "experimental",
|
|
11114
|
-
"summary": "
|
|
11339
|
+
"summary": "`history` with `next` recorded as the current definition of `tableName`;"
|
|
11115
11340
|
},
|
|
11116
|
-
"
|
|
11341
|
+
"locationInModule": {
|
|
11342
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
11343
|
+
"line": 153
|
|
11344
|
+
},
|
|
11345
|
+
"name": "append",
|
|
11346
|
+
"parameters": [
|
|
11347
|
+
{
|
|
11348
|
+
"docs": {
|
|
11349
|
+
"summary": "The schema history."
|
|
11350
|
+
},
|
|
11351
|
+
"name": "history",
|
|
11352
|
+
"type": {
|
|
11353
|
+
"fqn": "cdk-glue-iceberg-table.IcebergSchemaHistoryFile"
|
|
11354
|
+
}
|
|
11355
|
+
},
|
|
11356
|
+
{
|
|
11357
|
+
"docs": {
|
|
11358
|
+
"summary": "Glue table name."
|
|
11359
|
+
},
|
|
11360
|
+
"name": "tableName",
|
|
11361
|
+
"type": {
|
|
11362
|
+
"primitive": "string"
|
|
11363
|
+
}
|
|
11364
|
+
},
|
|
11365
|
+
{
|
|
11366
|
+
"docs": {
|
|
11367
|
+
"summary": "The table definition to record."
|
|
11368
|
+
},
|
|
11369
|
+
"name": "next",
|
|
11370
|
+
"type": {
|
|
11371
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableSchema"
|
|
11372
|
+
}
|
|
11373
|
+
}
|
|
11374
|
+
],
|
|
11375
|
+
"returns": {
|
|
11376
|
+
"type": {
|
|
11377
|
+
"fqn": "cdk-glue-iceberg-table.IcebergSchemaHistoryFile"
|
|
11378
|
+
}
|
|
11379
|
+
},
|
|
11380
|
+
"static": true
|
|
11117
11381
|
},
|
|
11118
11382
|
{
|
|
11119
11383
|
"docs": {
|
|
11384
|
+
"remarks": "Throws on JSON that is not a schema history.",
|
|
11120
11385
|
"stability": "experimental",
|
|
11121
|
-
"summary": "
|
|
11386
|
+
"summary": "Parse a schema history file's contents."
|
|
11122
11387
|
},
|
|
11123
|
-
"
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
"
|
|
11388
|
+
"locationInModule": {
|
|
11389
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
11390
|
+
"line": 198
|
|
11391
|
+
},
|
|
11392
|
+
"name": "fromJson",
|
|
11393
|
+
"parameters": [
|
|
11394
|
+
{
|
|
11395
|
+
"docs": {
|
|
11396
|
+
"summary": "File contents."
|
|
11397
|
+
},
|
|
11398
|
+
"name": "json",
|
|
11399
|
+
"type": {
|
|
11400
|
+
"primitive": "string"
|
|
11401
|
+
}
|
|
11402
|
+
}
|
|
11403
|
+
],
|
|
11404
|
+
"returns": {
|
|
11405
|
+
"type": {
|
|
11406
|
+
"fqn": "cdk-glue-iceberg-table.IcebergSchemaHistoryFile"
|
|
11407
|
+
}
|
|
11408
|
+
},
|
|
11409
|
+
"static": true
|
|
11410
|
+
},
|
|
11411
|
+
{
|
|
11412
|
+
"docs": {
|
|
11413
|
+
"stability": "experimental",
|
|
11414
|
+
"summary": "Serialize `history` as two-space indented JSON with a trailing newline, tables sorted by name, fields by id and partition fields by field id."
|
|
11415
|
+
},
|
|
11416
|
+
"locationInModule": {
|
|
11417
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
11418
|
+
"line": 166
|
|
11419
|
+
},
|
|
11420
|
+
"name": "toJson",
|
|
11421
|
+
"parameters": [
|
|
11422
|
+
{
|
|
11423
|
+
"docs": {
|
|
11424
|
+
"summary": "The schema history."
|
|
11425
|
+
},
|
|
11426
|
+
"name": "history",
|
|
11427
|
+
"type": {
|
|
11428
|
+
"fqn": "cdk-glue-iceberg-table.IcebergSchemaHistoryFile"
|
|
11429
|
+
}
|
|
11430
|
+
}
|
|
11431
|
+
],
|
|
11432
|
+
"returns": {
|
|
11433
|
+
"type": {
|
|
11434
|
+
"primitive": "string"
|
|
11435
|
+
}
|
|
11436
|
+
},
|
|
11437
|
+
"static": true
|
|
11438
|
+
},
|
|
11439
|
+
{
|
|
11440
|
+
"docs": {
|
|
11441
|
+
"remarks": "Run it after\n`cdk synth`; it writes nothing if any table's change is unsafe.",
|
|
11442
|
+
"stability": "experimental",
|
|
11443
|
+
"summary": "Record every table that set `schemaHistoryFile` in a synthesized cloud assembly into its history file, and return the paths of the files written."
|
|
11444
|
+
},
|
|
11445
|
+
"locationInModule": {
|
|
11446
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
11447
|
+
"line": 208
|
|
11448
|
+
},
|
|
11449
|
+
"name": "updateFromCloudAssembly",
|
|
11450
|
+
"parameters": [
|
|
11451
|
+
{
|
|
11452
|
+
"docs": {
|
|
11453
|
+
"summary": "The cloud assembly directory, usually `cdk.out`."
|
|
11454
|
+
},
|
|
11455
|
+
"name": "assemblyDirectory",
|
|
11456
|
+
"type": {
|
|
11457
|
+
"primitive": "string"
|
|
11458
|
+
}
|
|
11459
|
+
}
|
|
11460
|
+
],
|
|
11461
|
+
"returns": {
|
|
11462
|
+
"type": {
|
|
11463
|
+
"collection": {
|
|
11464
|
+
"elementtype": {
|
|
11465
|
+
"primitive": "string"
|
|
11466
|
+
},
|
|
11467
|
+
"kind": "array"
|
|
11468
|
+
}
|
|
11469
|
+
}
|
|
11470
|
+
},
|
|
11471
|
+
"static": true
|
|
11472
|
+
},
|
|
11473
|
+
{
|
|
11474
|
+
"docs": {
|
|
11475
|
+
"remarks": "empty when the change is safe. Fields\nare identified by id, so a field whose path changed under the same id is a rename.",
|
|
11476
|
+
"stability": "experimental",
|
|
11477
|
+
"summary": "Unsafe changes from `previous` to `next`;"
|
|
11478
|
+
},
|
|
11479
|
+
"locationInModule": {
|
|
11480
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
11481
|
+
"line": 132
|
|
11482
|
+
},
|
|
11483
|
+
"name": "validateSchemaEvolution",
|
|
11484
|
+
"parameters": [
|
|
11485
|
+
{
|
|
11486
|
+
"docs": {
|
|
11487
|
+
"summary": "The table's history record."
|
|
11488
|
+
},
|
|
11489
|
+
"name": "previous",
|
|
11490
|
+
"type": {
|
|
11491
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableHistory"
|
|
11492
|
+
}
|
|
11493
|
+
},
|
|
11494
|
+
{
|
|
11495
|
+
"docs": {
|
|
11496
|
+
"summary": "The new table definition."
|
|
11497
|
+
},
|
|
11498
|
+
"name": "next",
|
|
11499
|
+
"type": {
|
|
11500
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableSchema"
|
|
11501
|
+
}
|
|
11502
|
+
}
|
|
11503
|
+
],
|
|
11504
|
+
"returns": {
|
|
11505
|
+
"type": {
|
|
11506
|
+
"collection": {
|
|
11507
|
+
"elementtype": {
|
|
11508
|
+
"fqn": "cdk-glue-iceberg-table.IcebergSchemaViolation"
|
|
11509
|
+
},
|
|
11510
|
+
"kind": "array"
|
|
11511
|
+
}
|
|
11512
|
+
}
|
|
11513
|
+
},
|
|
11514
|
+
"static": true
|
|
11515
|
+
}
|
|
11516
|
+
],
|
|
11517
|
+
"name": "IcebergSchemaHistory",
|
|
11518
|
+
"symbolId": "lib/iceberg/iceberg-schema-history:IcebergSchemaHistory"
|
|
11519
|
+
},
|
|
11520
|
+
"cdk-glue-iceberg-table.IcebergSchemaHistoryFile": {
|
|
11521
|
+
"assembly": "cdk-glue-iceberg-table",
|
|
11522
|
+
"datatype": true,
|
|
11523
|
+
"docs": {
|
|
11524
|
+
"stability": "experimental",
|
|
11525
|
+
"summary": "Contents of a schema history file: one record per table."
|
|
11526
|
+
},
|
|
11527
|
+
"fqn": "cdk-glue-iceberg-table.IcebergSchemaHistoryFile",
|
|
11528
|
+
"kind": "interface",
|
|
11529
|
+
"locationInModule": {
|
|
11530
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
11531
|
+
"line": 74
|
|
11532
|
+
},
|
|
11533
|
+
"name": "IcebergSchemaHistoryFile",
|
|
11534
|
+
"properties": [
|
|
11535
|
+
{
|
|
11536
|
+
"abstract": true,
|
|
11537
|
+
"docs": {
|
|
11538
|
+
"stability": "experimental",
|
|
11539
|
+
"summary": "Table records, ordered by table name."
|
|
11540
|
+
},
|
|
11541
|
+
"immutable": true,
|
|
11542
|
+
"locationInModule": {
|
|
11543
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
11544
|
+
"line": 76
|
|
11545
|
+
},
|
|
11546
|
+
"name": "tables",
|
|
11547
|
+
"type": {
|
|
11548
|
+
"collection": {
|
|
11549
|
+
"elementtype": {
|
|
11550
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableHistory"
|
|
11551
|
+
},
|
|
11552
|
+
"kind": "array"
|
|
11553
|
+
}
|
|
11554
|
+
}
|
|
11555
|
+
}
|
|
11556
|
+
],
|
|
11557
|
+
"symbolId": "lib/iceberg/iceberg-schema-history:IcebergSchemaHistoryFile"
|
|
11558
|
+
},
|
|
11559
|
+
"cdk-glue-iceberg-table.IcebergSchemaViolation": {
|
|
11560
|
+
"assembly": "cdk-glue-iceberg-table",
|
|
11561
|
+
"datatype": true,
|
|
11562
|
+
"docs": {
|
|
11563
|
+
"stability": "experimental",
|
|
11564
|
+
"summary": "One unsafe change between a table's history and a new definition."
|
|
11565
|
+
},
|
|
11566
|
+
"fqn": "cdk-glue-iceberg-table.IcebergSchemaViolation",
|
|
11567
|
+
"kind": "interface",
|
|
11568
|
+
"locationInModule": {
|
|
11569
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
11570
|
+
"line": 110
|
|
11571
|
+
},
|
|
11572
|
+
"name": "IcebergSchemaViolation",
|
|
11573
|
+
"properties": [
|
|
11574
|
+
{
|
|
11575
|
+
"abstract": true,
|
|
11576
|
+
"docs": {
|
|
11577
|
+
"stability": "experimental",
|
|
11578
|
+
"summary": "Class of the change."
|
|
11579
|
+
},
|
|
11580
|
+
"immutable": true,
|
|
11581
|
+
"locationInModule": {
|
|
11582
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
11583
|
+
"line": 112
|
|
11584
|
+
},
|
|
11585
|
+
"name": "kind",
|
|
11586
|
+
"type": {
|
|
11587
|
+
"fqn": "cdk-glue-iceberg-table.IcebergSchemaViolationKind"
|
|
11588
|
+
}
|
|
11589
|
+
},
|
|
11590
|
+
{
|
|
11591
|
+
"abstract": true,
|
|
11592
|
+
"docs": {
|
|
11593
|
+
"stability": "experimental",
|
|
11594
|
+
"summary": "Description naming the field and the ids involved."
|
|
11595
|
+
},
|
|
11596
|
+
"immutable": true,
|
|
11597
|
+
"locationInModule": {
|
|
11598
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
11599
|
+
"line": 115
|
|
11600
|
+
},
|
|
11601
|
+
"name": "message",
|
|
11602
|
+
"type": {
|
|
11603
|
+
"primitive": "string"
|
|
11604
|
+
}
|
|
11605
|
+
}
|
|
11606
|
+
],
|
|
11607
|
+
"symbolId": "lib/iceberg/iceberg-schema-history:IcebergSchemaViolation"
|
|
11608
|
+
},
|
|
11609
|
+
"cdk-glue-iceberg-table.IcebergSchemaViolationKind": {
|
|
11610
|
+
"assembly": "cdk-glue-iceberg-table",
|
|
11611
|
+
"docs": {
|
|
11612
|
+
"stability": "experimental",
|
|
11613
|
+
"summary": "Class of an unsafe schema change."
|
|
11614
|
+
},
|
|
11615
|
+
"fqn": "cdk-glue-iceberg-table.IcebergSchemaViolationKind",
|
|
11616
|
+
"kind": "enum",
|
|
11617
|
+
"locationInModule": {
|
|
11618
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
11619
|
+
"line": 89
|
|
11620
|
+
},
|
|
11621
|
+
"members": [
|
|
11622
|
+
{
|
|
11623
|
+
"docs": {
|
|
11624
|
+
"stability": "experimental",
|
|
11625
|
+
"summary": "A field id from the history is used by a different field."
|
|
11626
|
+
},
|
|
11627
|
+
"name": "FIELD_ID_REUSED"
|
|
11628
|
+
},
|
|
11629
|
+
{
|
|
11630
|
+
"docs": {
|
|
11631
|
+
"stability": "experimental",
|
|
11632
|
+
"summary": "A field kept its path but changed its id."
|
|
11633
|
+
},
|
|
11634
|
+
"name": "FIELD_ID_CHANGED"
|
|
11635
|
+
},
|
|
11636
|
+
{
|
|
11637
|
+
"docs": {
|
|
11638
|
+
"stability": "experimental",
|
|
11639
|
+
"summary": "A field changed to a type Iceberg cannot promote it to."
|
|
11640
|
+
},
|
|
11641
|
+
"name": "TYPE_CHANGED"
|
|
11642
|
+
},
|
|
11643
|
+
{
|
|
11644
|
+
"docs": {
|
|
11645
|
+
"stability": "experimental",
|
|
11646
|
+
"summary": "An optional field became required."
|
|
11647
|
+
},
|
|
11648
|
+
"name": "OPTIONAL_TO_REQUIRED"
|
|
11649
|
+
},
|
|
11650
|
+
{
|
|
11651
|
+
"docs": {
|
|
11652
|
+
"stability": "experimental",
|
|
11653
|
+
"summary": "A column that a recorded partition spec is sourced from was dropped."
|
|
11654
|
+
},
|
|
11655
|
+
"name": "PARTITION_SOURCE_DROPPED"
|
|
11656
|
+
},
|
|
11657
|
+
{
|
|
11658
|
+
"docs": {
|
|
11659
|
+
"stability": "experimental",
|
|
11660
|
+
"summary": "A partition field id is used with a different source or transform."
|
|
11661
|
+
},
|
|
11662
|
+
"name": "PARTITION_FIELD_CHANGED"
|
|
11663
|
+
}
|
|
11664
|
+
],
|
|
11665
|
+
"name": "IcebergSchemaViolationKind",
|
|
11666
|
+
"symbolId": "lib/iceberg/iceberg-schema-history:IcebergSchemaViolationKind"
|
|
11667
|
+
},
|
|
11668
|
+
"cdk-glue-iceberg-table.IcebergSortDirection": {
|
|
11669
|
+
"assembly": "cdk-glue-iceberg-table",
|
|
11670
|
+
"docs": {
|
|
11671
|
+
"stability": "experimental",
|
|
11672
|
+
"summary": "Sort direction for an Iceberg sort field."
|
|
11673
|
+
},
|
|
11674
|
+
"fqn": "cdk-glue-iceberg-table.IcebergSortDirection",
|
|
11675
|
+
"kind": "enum",
|
|
11676
|
+
"locationInModule": {
|
|
11677
|
+
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11678
|
+
"line": 67
|
|
11679
|
+
},
|
|
11680
|
+
"members": [
|
|
11681
|
+
{
|
|
11682
|
+
"docs": {
|
|
11683
|
+
"stability": "experimental",
|
|
11684
|
+
"summary": "Ascending — smaller values first."
|
|
11685
|
+
},
|
|
11686
|
+
"name": "ASC"
|
|
11687
|
+
},
|
|
11688
|
+
{
|
|
11689
|
+
"docs": {
|
|
11690
|
+
"stability": "experimental",
|
|
11691
|
+
"summary": "Descending — larger values first."
|
|
11692
|
+
},
|
|
11693
|
+
"name": "DESC"
|
|
11694
|
+
}
|
|
11695
|
+
],
|
|
11696
|
+
"name": "IcebergSortDirection",
|
|
11697
|
+
"symbolId": "lib/iceberg/iceberg-table:IcebergSortDirection"
|
|
11698
|
+
},
|
|
11699
|
+
"cdk-glue-iceberg-table.IcebergSortField": {
|
|
11700
|
+
"assembly": "cdk-glue-iceberg-table",
|
|
11701
|
+
"datatype": true,
|
|
11702
|
+
"docs": {
|
|
11703
|
+
"stability": "experimental",
|
|
11704
|
+
"summary": "One write-order (sort) field."
|
|
11705
|
+
},
|
|
11706
|
+
"fqn": "cdk-glue-iceberg-table.IcebergSortField",
|
|
11707
|
+
"kind": "interface",
|
|
11708
|
+
"locationInModule": {
|
|
11709
|
+
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11710
|
+
"line": 149
|
|
11711
|
+
},
|
|
11712
|
+
"name": "IcebergSortField",
|
|
11713
|
+
"properties": [
|
|
11714
|
+
{
|
|
11715
|
+
"abstract": true,
|
|
11716
|
+
"docs": {
|
|
11717
|
+
"stability": "experimental",
|
|
11718
|
+
"summary": "Name of the top-level table column to sort on."
|
|
11149
11719
|
},
|
|
11150
11720
|
"immutable": true,
|
|
11151
11721
|
"locationInModule": {
|
|
11152
11722
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11153
|
-
"line":
|
|
11723
|
+
"line": 151
|
|
11154
11724
|
},
|
|
11155
11725
|
"name": "sourceColumn",
|
|
11156
11726
|
"type": {
|
|
@@ -11167,7 +11737,7 @@
|
|
|
11167
11737
|
"immutable": true,
|
|
11168
11738
|
"locationInModule": {
|
|
11169
11739
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11170
|
-
"line":
|
|
11740
|
+
"line": 157
|
|
11171
11741
|
},
|
|
11172
11742
|
"name": "direction",
|
|
11173
11743
|
"optional": true,
|
|
@@ -11185,7 +11755,7 @@
|
|
|
11185
11755
|
"immutable": true,
|
|
11186
11756
|
"locationInModule": {
|
|
11187
11757
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11188
|
-
"line":
|
|
11758
|
+
"line": 160
|
|
11189
11759
|
},
|
|
11190
11760
|
"name": "nullOrder",
|
|
11191
11761
|
"optional": true,
|
|
@@ -11203,7 +11773,7 @@
|
|
|
11203
11773
|
"immutable": true,
|
|
11204
11774
|
"locationInModule": {
|
|
11205
11775
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11206
|
-
"line":
|
|
11776
|
+
"line": 154
|
|
11207
11777
|
},
|
|
11208
11778
|
"name": "transform",
|
|
11209
11779
|
"optional": true,
|
|
@@ -11330,7 +11900,7 @@
|
|
|
11330
11900
|
},
|
|
11331
11901
|
"locationInModule": {
|
|
11332
11902
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11333
|
-
"line":
|
|
11903
|
+
"line": 312
|
|
11334
11904
|
},
|
|
11335
11905
|
"parameters": [
|
|
11336
11906
|
{
|
|
@@ -11359,7 +11929,7 @@
|
|
|
11359
11929
|
"kind": "class",
|
|
11360
11930
|
"locationInModule": {
|
|
11361
11931
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11362
|
-
"line":
|
|
11932
|
+
"line": 285
|
|
11363
11933
|
},
|
|
11364
11934
|
"methods": [
|
|
11365
11935
|
{
|
|
@@ -11369,7 +11939,7 @@
|
|
|
11369
11939
|
},
|
|
11370
11940
|
"locationInModule": {
|
|
11371
11941
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11372
|
-
"line":
|
|
11942
|
+
"line": 391
|
|
11373
11943
|
},
|
|
11374
11944
|
"name": "creationOrderFieldIds",
|
|
11375
11945
|
"parameters": [
|
|
@@ -11408,7 +11978,7 @@
|
|
|
11408
11978
|
},
|
|
11409
11979
|
"locationInModule": {
|
|
11410
11980
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11411
|
-
"line":
|
|
11981
|
+
"line": 401
|
|
11412
11982
|
},
|
|
11413
11983
|
"name": "fromIcebergTableAttributes",
|
|
11414
11984
|
"parameters": [
|
|
@@ -11441,11 +12011,11 @@
|
|
|
11441
12011
|
{
|
|
11442
12012
|
"docs": {
|
|
11443
12013
|
"stability": "experimental",
|
|
11444
|
-
"summary": "Grant Glue
|
|
12014
|
+
"summary": "Grant Glue + S3 read on this table."
|
|
11445
12015
|
},
|
|
11446
12016
|
"locationInModule": {
|
|
11447
12017
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11448
|
-
"line":
|
|
12018
|
+
"line": 448
|
|
11449
12019
|
},
|
|
11450
12020
|
"name": "grantRead",
|
|
11451
12021
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -11455,6 +12025,13 @@
|
|
|
11455
12025
|
"type": {
|
|
11456
12026
|
"fqn": "aws-cdk-lib.aws_iam.IGrantable"
|
|
11457
12027
|
}
|
|
12028
|
+
},
|
|
12029
|
+
{
|
|
12030
|
+
"name": "options",
|
|
12031
|
+
"optional": true,
|
|
12032
|
+
"type": {
|
|
12033
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableGrantOptions"
|
|
12034
|
+
}
|
|
11458
12035
|
}
|
|
11459
12036
|
],
|
|
11460
12037
|
"returns": {
|
|
@@ -11470,7 +12047,7 @@
|
|
|
11470
12047
|
},
|
|
11471
12048
|
"locationInModule": {
|
|
11472
12049
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11473
|
-
"line":
|
|
12050
|
+
"line": 458
|
|
11474
12051
|
},
|
|
11475
12052
|
"name": "grantReadWrite",
|
|
11476
12053
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -11480,6 +12057,13 @@
|
|
|
11480
12057
|
"type": {
|
|
11481
12058
|
"fqn": "aws-cdk-lib.aws_iam.IGrantable"
|
|
11482
12059
|
}
|
|
12060
|
+
},
|
|
12061
|
+
{
|
|
12062
|
+
"name": "options",
|
|
12063
|
+
"optional": true,
|
|
12064
|
+
"type": {
|
|
12065
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableGrantOptions"
|
|
12066
|
+
}
|
|
11483
12067
|
}
|
|
11484
12068
|
],
|
|
11485
12069
|
"returns": {
|
|
@@ -11491,11 +12075,11 @@
|
|
|
11491
12075
|
{
|
|
11492
12076
|
"docs": {
|
|
11493
12077
|
"stability": "experimental",
|
|
11494
|
-
"summary": "Grant Glue
|
|
12078
|
+
"summary": "Grant Glue + S3 write on this table."
|
|
11495
12079
|
},
|
|
11496
12080
|
"locationInModule": {
|
|
11497
12081
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11498
|
-
"line":
|
|
12082
|
+
"line": 453
|
|
11499
12083
|
},
|
|
11500
12084
|
"name": "grantWrite",
|
|
11501
12085
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -11505,6 +12089,13 @@
|
|
|
11505
12089
|
"type": {
|
|
11506
12090
|
"fqn": "aws-cdk-lib.aws_iam.IGrantable"
|
|
11507
12091
|
}
|
|
12092
|
+
},
|
|
12093
|
+
{
|
|
12094
|
+
"name": "options",
|
|
12095
|
+
"optional": true,
|
|
12096
|
+
"type": {
|
|
12097
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableGrantOptions"
|
|
12098
|
+
}
|
|
11508
12099
|
}
|
|
11509
12100
|
],
|
|
11510
12101
|
"returns": {
|
|
@@ -11524,7 +12115,7 @@
|
|
|
11524
12115
|
"immutable": true,
|
|
11525
12116
|
"locationInModule": {
|
|
11526
12117
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11527
|
-
"line":
|
|
12118
|
+
"line": 293
|
|
11528
12119
|
},
|
|
11529
12120
|
"name": "database",
|
|
11530
12121
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -11540,7 +12131,7 @@
|
|
|
11540
12131
|
"immutable": true,
|
|
11541
12132
|
"locationInModule": {
|
|
11542
12133
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11543
|
-
"line":
|
|
12134
|
+
"line": 302
|
|
11544
12135
|
},
|
|
11545
12136
|
"name": "dataFormat",
|
|
11546
12137
|
"type": {
|
|
@@ -11555,7 +12146,7 @@
|
|
|
11555
12146
|
"immutable": true,
|
|
11556
12147
|
"locationInModule": {
|
|
11557
12148
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11558
|
-
"line":
|
|
12149
|
+
"line": 305
|
|
11559
12150
|
},
|
|
11560
12151
|
"name": "formatVersion",
|
|
11561
12152
|
"type": {
|
|
@@ -11570,7 +12161,7 @@
|
|
|
11570
12161
|
"immutable": true,
|
|
11571
12162
|
"locationInModule": {
|
|
11572
12163
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11573
|
-
"line":
|
|
12164
|
+
"line": 296
|
|
11574
12165
|
},
|
|
11575
12166
|
"name": "location",
|
|
11576
12167
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -11586,7 +12177,7 @@
|
|
|
11586
12177
|
"immutable": true,
|
|
11587
12178
|
"locationInModule": {
|
|
11588
12179
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11589
|
-
"line":
|
|
12180
|
+
"line": 308
|
|
11590
12181
|
},
|
|
11591
12182
|
"name": "resource",
|
|
11592
12183
|
"type": {
|
|
@@ -11601,7 +12192,7 @@
|
|
|
11601
12192
|
"immutable": true,
|
|
11602
12193
|
"locationInModule": {
|
|
11603
12194
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11604
|
-
"line":
|
|
12195
|
+
"line": 287
|
|
11605
12196
|
},
|
|
11606
12197
|
"name": "tableArn",
|
|
11607
12198
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -11617,13 +12208,30 @@
|
|
|
11617
12208
|
"immutable": true,
|
|
11618
12209
|
"locationInModule": {
|
|
11619
12210
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11620
|
-
"line":
|
|
12211
|
+
"line": 290
|
|
11621
12212
|
},
|
|
11622
12213
|
"name": "tableName",
|
|
11623
12214
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
11624
12215
|
"type": {
|
|
11625
12216
|
"primitive": "string"
|
|
11626
12217
|
}
|
|
12218
|
+
},
|
|
12219
|
+
{
|
|
12220
|
+
"docs": {
|
|
12221
|
+
"stability": "experimental",
|
|
12222
|
+
"summary": "KMS key the table's objects are encrypted with, as given in the props."
|
|
12223
|
+
},
|
|
12224
|
+
"immutable": true,
|
|
12225
|
+
"locationInModule": {
|
|
12226
|
+
"filename": "lib/iceberg/iceberg-table.ts",
|
|
12227
|
+
"line": 299
|
|
12228
|
+
},
|
|
12229
|
+
"name": "encryptionKey",
|
|
12230
|
+
"optional": true,
|
|
12231
|
+
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
12232
|
+
"type": {
|
|
12233
|
+
"fqn": "aws-cdk-lib.aws_kms.IKey"
|
|
12234
|
+
}
|
|
11627
12235
|
}
|
|
11628
12236
|
],
|
|
11629
12237
|
"symbolId": "lib/iceberg/iceberg-table:IcebergTable"
|
|
@@ -11639,7 +12247,7 @@
|
|
|
11639
12247
|
"kind": "interface",
|
|
11640
12248
|
"locationInModule": {
|
|
11641
12249
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11642
|
-
"line":
|
|
12250
|
+
"line": 464
|
|
11643
12251
|
},
|
|
11644
12252
|
"name": "IcebergTableAttributes",
|
|
11645
12253
|
"properties": [
|
|
@@ -11652,7 +12260,7 @@
|
|
|
11652
12260
|
"immutable": true,
|
|
11653
12261
|
"locationInModule": {
|
|
11654
12262
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11655
|
-
"line":
|
|
12263
|
+
"line": 466
|
|
11656
12264
|
},
|
|
11657
12265
|
"name": "database",
|
|
11658
12266
|
"type": {
|
|
@@ -11668,7 +12276,7 @@
|
|
|
11668
12276
|
"immutable": true,
|
|
11669
12277
|
"locationInModule": {
|
|
11670
12278
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11671
|
-
"line":
|
|
12279
|
+
"line": 472
|
|
11672
12280
|
},
|
|
11673
12281
|
"name": "location",
|
|
11674
12282
|
"type": {
|
|
@@ -11684,16 +12292,164 @@
|
|
|
11684
12292
|
"immutable": true,
|
|
11685
12293
|
"locationInModule": {
|
|
11686
12294
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11687
|
-
"line":
|
|
12295
|
+
"line": 469
|
|
11688
12296
|
},
|
|
11689
12297
|
"name": "tableName",
|
|
11690
12298
|
"type": {
|
|
11691
12299
|
"primitive": "string"
|
|
11692
12300
|
}
|
|
12301
|
+
},
|
|
12302
|
+
{
|
|
12303
|
+
"abstract": true,
|
|
12304
|
+
"docs": {
|
|
12305
|
+
"remarks": "grants add the actions of `IcebergTableProps.encryptionKey` on the whole key.",
|
|
12306
|
+
"stability": "experimental",
|
|
12307
|
+
"summary": "KMS key the table's objects are encrypted with;"
|
|
12308
|
+
},
|
|
12309
|
+
"immutable": true,
|
|
12310
|
+
"locationInModule": {
|
|
12311
|
+
"filename": "lib/iceberg/iceberg-table.ts",
|
|
12312
|
+
"line": 475
|
|
12313
|
+
},
|
|
12314
|
+
"name": "encryptionKey",
|
|
12315
|
+
"optional": true,
|
|
12316
|
+
"type": {
|
|
12317
|
+
"fqn": "aws-cdk-lib.aws_kms.IKey"
|
|
12318
|
+
}
|
|
11693
12319
|
}
|
|
11694
12320
|
],
|
|
11695
12321
|
"symbolId": "lib/iceberg/iceberg-table:IcebergTableAttributes"
|
|
11696
12322
|
},
|
|
12323
|
+
"cdk-glue-iceberg-table.IcebergTableGrantOptions": {
|
|
12324
|
+
"assembly": "cdk-glue-iceberg-table",
|
|
12325
|
+
"datatype": true,
|
|
12326
|
+
"docs": {
|
|
12327
|
+
"stability": "experimental",
|
|
12328
|
+
"summary": "Options for `grantRead`, `grantWrite` and `grantReadWrite` on an Iceberg table."
|
|
12329
|
+
},
|
|
12330
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableGrantOptions",
|
|
12331
|
+
"kind": "interface",
|
|
12332
|
+
"locationInModule": {
|
|
12333
|
+
"filename": "lib/iceberg/iceberg-table-grants.ts",
|
|
12334
|
+
"line": 193
|
|
12335
|
+
},
|
|
12336
|
+
"name": "IcebergTableGrantOptions",
|
|
12337
|
+
"properties": [
|
|
12338
|
+
{
|
|
12339
|
+
"abstract": true,
|
|
12340
|
+
"docs": {
|
|
12341
|
+
"remarks": "Read grants add `kms:Decrypt`; write grants add `kms:Decrypt`,\n`kms:Encrypt` and `kms:GenerateDataKey`, on the whole key.",
|
|
12342
|
+
"stability": "experimental",
|
|
12343
|
+
"summary": "KMS key the account's Data Catalog is encrypted with (`SSE-KMS`)."
|
|
12344
|
+
},
|
|
12345
|
+
"immutable": true,
|
|
12346
|
+
"locationInModule": {
|
|
12347
|
+
"filename": "lib/iceberg/iceberg-table-grants.ts",
|
|
12348
|
+
"line": 206
|
|
12349
|
+
},
|
|
12350
|
+
"name": "catalogEncryptionKey",
|
|
12351
|
+
"optional": true,
|
|
12352
|
+
"type": {
|
|
12353
|
+
"fqn": "aws-cdk-lib.aws_kms.IKey"
|
|
12354
|
+
}
|
|
12355
|
+
},
|
|
12356
|
+
{
|
|
12357
|
+
"abstract": true,
|
|
12358
|
+
"docs": {
|
|
12359
|
+
"remarks": "The Lake\nFormation permissions themselves are not created. Defaults to `false`.",
|
|
12360
|
+
"stability": "experimental",
|
|
12361
|
+
"summary": "Add `lakeformation:GetDataAccess` on `*`, which Athena needs to read a table whose location is registered with Lake Formation."
|
|
12362
|
+
},
|
|
12363
|
+
"immutable": true,
|
|
12364
|
+
"locationInModule": {
|
|
12365
|
+
"filename": "lib/iceberg/iceberg-table-grants.ts",
|
|
12366
|
+
"line": 199
|
|
12367
|
+
},
|
|
12368
|
+
"name": "lakeFormationDataAccess",
|
|
12369
|
+
"optional": true,
|
|
12370
|
+
"type": {
|
|
12371
|
+
"primitive": "boolean"
|
|
12372
|
+
}
|
|
12373
|
+
}
|
|
12374
|
+
],
|
|
12375
|
+
"symbolId": "lib/iceberg/iceberg-table-grants:IcebergTableGrantOptions"
|
|
12376
|
+
},
|
|
12377
|
+
"cdk-glue-iceberg-table.IcebergTableHistory": {
|
|
12378
|
+
"assembly": "cdk-glue-iceberg-table",
|
|
12379
|
+
"datatype": true,
|
|
12380
|
+
"docs": {
|
|
12381
|
+
"stability": "experimental",
|
|
12382
|
+
"summary": "Every field and partition field id one table has used."
|
|
12383
|
+
},
|
|
12384
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableHistory",
|
|
12385
|
+
"kind": "interface",
|
|
12386
|
+
"locationInModule": {
|
|
12387
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
12388
|
+
"line": 62
|
|
12389
|
+
},
|
|
12390
|
+
"name": "IcebergTableHistory",
|
|
12391
|
+
"properties": [
|
|
12392
|
+
{
|
|
12393
|
+
"abstract": true,
|
|
12394
|
+
"docs": {
|
|
12395
|
+
"stability": "experimental",
|
|
12396
|
+
"summary": "Fields, ordered by id."
|
|
12397
|
+
},
|
|
12398
|
+
"immutable": true,
|
|
12399
|
+
"locationInModule": {
|
|
12400
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
12401
|
+
"line": 67
|
|
12402
|
+
},
|
|
12403
|
+
"name": "fields",
|
|
12404
|
+
"type": {
|
|
12405
|
+
"collection": {
|
|
12406
|
+
"elementtype": {
|
|
12407
|
+
"fqn": "cdk-glue-iceberg-table.IcebergFieldHistory"
|
|
12408
|
+
},
|
|
12409
|
+
"kind": "array"
|
|
12410
|
+
}
|
|
12411
|
+
}
|
|
12412
|
+
},
|
|
12413
|
+
{
|
|
12414
|
+
"abstract": true,
|
|
12415
|
+
"docs": {
|
|
12416
|
+
"stability": "experimental",
|
|
12417
|
+
"summary": "Partition fields, ordered by field id."
|
|
12418
|
+
},
|
|
12419
|
+
"immutable": true,
|
|
12420
|
+
"locationInModule": {
|
|
12421
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
12422
|
+
"line": 70
|
|
12423
|
+
},
|
|
12424
|
+
"name": "partitionFields",
|
|
12425
|
+
"type": {
|
|
12426
|
+
"collection": {
|
|
12427
|
+
"elementtype": {
|
|
12428
|
+
"fqn": "cdk-glue-iceberg-table.IcebergPartitionFieldHistory"
|
|
12429
|
+
},
|
|
12430
|
+
"kind": "array"
|
|
12431
|
+
}
|
|
12432
|
+
}
|
|
12433
|
+
},
|
|
12434
|
+
{
|
|
12435
|
+
"abstract": true,
|
|
12436
|
+
"docs": {
|
|
12437
|
+
"stability": "experimental",
|
|
12438
|
+
"summary": "Glue table name."
|
|
12439
|
+
},
|
|
12440
|
+
"immutable": true,
|
|
12441
|
+
"locationInModule": {
|
|
12442
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
12443
|
+
"line": 64
|
|
12444
|
+
},
|
|
12445
|
+
"name": "tableName",
|
|
12446
|
+
"type": {
|
|
12447
|
+
"primitive": "string"
|
|
12448
|
+
}
|
|
12449
|
+
}
|
|
12450
|
+
],
|
|
12451
|
+
"symbolId": "lib/iceberg/iceberg-schema-history:IcebergTableHistory"
|
|
12452
|
+
},
|
|
11697
12453
|
"cdk-glue-iceberg-table.IcebergTableProps": {
|
|
11698
12454
|
"assembly": "cdk-glue-iceberg-table",
|
|
11699
12455
|
"datatype": true,
|
|
@@ -11705,7 +12461,7 @@
|
|
|
11705
12461
|
"kind": "interface",
|
|
11706
12462
|
"locationInModule": {
|
|
11707
12463
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11708
|
-
"line":
|
|
12464
|
+
"line": 164
|
|
11709
12465
|
},
|
|
11710
12466
|
"name": "IcebergTableProps",
|
|
11711
12467
|
"properties": [
|
|
@@ -11719,7 +12475,7 @@
|
|
|
11719
12475
|
"immutable": true,
|
|
11720
12476
|
"locationInModule": {
|
|
11721
12477
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11722
|
-
"line":
|
|
12478
|
+
"line": 172
|
|
11723
12479
|
},
|
|
11724
12480
|
"name": "columns",
|
|
11725
12481
|
"type": {
|
|
@@ -11740,7 +12496,7 @@
|
|
|
11740
12496
|
"immutable": true,
|
|
11741
12497
|
"locationInModule": {
|
|
11742
12498
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11743
|
-
"line":
|
|
12499
|
+
"line": 166
|
|
11744
12500
|
},
|
|
11745
12501
|
"name": "database",
|
|
11746
12502
|
"type": {
|
|
@@ -11757,7 +12513,7 @@
|
|
|
11757
12513
|
"immutable": true,
|
|
11758
12514
|
"locationInModule": {
|
|
11759
12515
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11760
|
-
"line":
|
|
12516
|
+
"line": 205
|
|
11761
12517
|
},
|
|
11762
12518
|
"name": "formatVersion",
|
|
11763
12519
|
"type": {
|
|
@@ -11774,7 +12530,7 @@
|
|
|
11774
12530
|
"immutable": true,
|
|
11775
12531
|
"locationInModule": {
|
|
11776
12532
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11777
|
-
"line":
|
|
12533
|
+
"line": 175
|
|
11778
12534
|
},
|
|
11779
12535
|
"name": "location",
|
|
11780
12536
|
"type": {
|
|
@@ -11790,7 +12546,7 @@
|
|
|
11790
12546
|
"immutable": true,
|
|
11791
12547
|
"locationInModule": {
|
|
11792
12548
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11793
|
-
"line":
|
|
12549
|
+
"line": 169
|
|
11794
12550
|
},
|
|
11795
12551
|
"name": "tableName",
|
|
11796
12552
|
"type": {
|
|
@@ -11807,7 +12563,7 @@
|
|
|
11807
12563
|
"immutable": true,
|
|
11808
12564
|
"locationInModule": {
|
|
11809
12565
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11810
|
-
"line":
|
|
12566
|
+
"line": 225
|
|
11811
12567
|
},
|
|
11812
12568
|
"name": "comment",
|
|
11813
12569
|
"optional": true,
|
|
@@ -11825,7 +12581,7 @@
|
|
|
11825
12581
|
"immutable": true,
|
|
11826
12582
|
"locationInModule": {
|
|
11827
12583
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11828
|
-
"line":
|
|
12584
|
+
"line": 202
|
|
11829
12585
|
},
|
|
11830
12586
|
"name": "dataFormat",
|
|
11831
12587
|
"optional": true,
|
|
@@ -11833,6 +12589,24 @@
|
|
|
11833
12589
|
"fqn": "cdk-glue-iceberg-table.IcebergDataFormat"
|
|
11834
12590
|
}
|
|
11835
12591
|
},
|
|
12592
|
+
{
|
|
12593
|
+
"abstract": true,
|
|
12594
|
+
"docs": {
|
|
12595
|
+
"remarks": "When set, read grants\nadd `kms:Decrypt` and write grants add `kms:Decrypt` and\n`kms:GenerateDataKey`, on the whole key. Defaults to no KMS permission.",
|
|
12596
|
+
"stability": "experimental",
|
|
12597
|
+
"summary": "KMS key the table's bucket encrypts objects with."
|
|
12598
|
+
},
|
|
12599
|
+
"immutable": true,
|
|
12600
|
+
"locationInModule": {
|
|
12601
|
+
"filename": "lib/iceberg/iceberg-table.ts",
|
|
12602
|
+
"line": 182
|
|
12603
|
+
},
|
|
12604
|
+
"name": "encryptionKey",
|
|
12605
|
+
"optional": true,
|
|
12606
|
+
"type": {
|
|
12607
|
+
"fqn": "aws-cdk-lib.aws_kms.IKey"
|
|
12608
|
+
}
|
|
12609
|
+
},
|
|
11836
12610
|
{
|
|
11837
12611
|
"abstract": true,
|
|
11838
12612
|
"docs": {
|
|
@@ -11843,7 +12617,7 @@
|
|
|
11843
12617
|
"immutable": true,
|
|
11844
12618
|
"locationInModule": {
|
|
11845
12619
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11846
|
-
"line":
|
|
12620
|
+
"line": 199
|
|
11847
12621
|
},
|
|
11848
12622
|
"name": "identifierFieldNames",
|
|
11849
12623
|
"optional": true,
|
|
@@ -11866,7 +12640,7 @@
|
|
|
11866
12640
|
"immutable": true,
|
|
11867
12641
|
"locationInModule": {
|
|
11868
12642
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11869
|
-
"line":
|
|
12643
|
+
"line": 185
|
|
11870
12644
|
},
|
|
11871
12645
|
"name": "partitionSpec",
|
|
11872
12646
|
"optional": true,
|
|
@@ -11889,7 +12663,7 @@
|
|
|
11889
12663
|
"immutable": true,
|
|
11890
12664
|
"locationInModule": {
|
|
11891
12665
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11892
|
-
"line":
|
|
12666
|
+
"line": 232
|
|
11893
12667
|
},
|
|
11894
12668
|
"name": "removalPolicy",
|
|
11895
12669
|
"optional": true,
|
|
@@ -11897,6 +12671,25 @@
|
|
|
11897
12671
|
"fqn": "aws-cdk-lib.RemovalPolicy"
|
|
11898
12672
|
}
|
|
11899
12673
|
},
|
|
12674
|
+
{
|
|
12675
|
+
"abstract": true,
|
|
12676
|
+
"docs": {
|
|
12677
|
+
"default": "- no history check",
|
|
12678
|
+
"remarks": "Synth fails if the file is missing or malformed, or if the\ndefinition is an unsafe change from the table's record in it. See the README\nsection \"Checking changes against a schema history\".",
|
|
12679
|
+
"stability": "experimental",
|
|
12680
|
+
"summary": "Path of the committed schema history file of the table's database, relative to the working directory."
|
|
12681
|
+
},
|
|
12682
|
+
"immutable": true,
|
|
12683
|
+
"locationInModule": {
|
|
12684
|
+
"filename": "lib/iceberg/iceberg-table.ts",
|
|
12685
|
+
"line": 241
|
|
12686
|
+
},
|
|
12687
|
+
"name": "schemaHistoryFile",
|
|
12688
|
+
"optional": true,
|
|
12689
|
+
"type": {
|
|
12690
|
+
"primitive": "string"
|
|
12691
|
+
}
|
|
12692
|
+
},
|
|
11900
12693
|
{
|
|
11901
12694
|
"abstract": true,
|
|
11902
12695
|
"docs": {
|
|
@@ -11907,7 +12700,7 @@
|
|
|
11907
12700
|
"immutable": true,
|
|
11908
12701
|
"locationInModule": {
|
|
11909
12702
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11910
|
-
"line":
|
|
12703
|
+
"line": 188
|
|
11911
12704
|
},
|
|
11912
12705
|
"name": "sortOrder",
|
|
11913
12706
|
"optional": true,
|
|
@@ -11930,7 +12723,7 @@
|
|
|
11930
12723
|
"immutable": true,
|
|
11931
12724
|
"locationInModule": {
|
|
11932
12725
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
11933
|
-
"line":
|
|
12726
|
+
"line": 214
|
|
11934
12727
|
},
|
|
11935
12728
|
"name": "tableProperties",
|
|
11936
12729
|
"optional": true,
|
|
@@ -11946,6 +12739,67 @@
|
|
|
11946
12739
|
],
|
|
11947
12740
|
"symbolId": "lib/iceberg/iceberg-table:IcebergTableProps"
|
|
11948
12741
|
},
|
|
12742
|
+
"cdk-glue-iceberg-table.IcebergTableSchema": {
|
|
12743
|
+
"assembly": "cdk-glue-iceberg-table",
|
|
12744
|
+
"datatype": true,
|
|
12745
|
+
"docs": {
|
|
12746
|
+
"stability": "experimental",
|
|
12747
|
+
"summary": "The part of a table definition the schema history records."
|
|
12748
|
+
},
|
|
12749
|
+
"fqn": "cdk-glue-iceberg-table.IcebergTableSchema",
|
|
12750
|
+
"kind": "interface",
|
|
12751
|
+
"locationInModule": {
|
|
12752
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
12753
|
+
"line": 80
|
|
12754
|
+
},
|
|
12755
|
+
"name": "IcebergTableSchema",
|
|
12756
|
+
"properties": [
|
|
12757
|
+
{
|
|
12758
|
+
"abstract": true,
|
|
12759
|
+
"docs": {
|
|
12760
|
+
"stability": "experimental",
|
|
12761
|
+
"summary": "Top-level columns."
|
|
12762
|
+
},
|
|
12763
|
+
"immutable": true,
|
|
12764
|
+
"locationInModule": {
|
|
12765
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
12766
|
+
"line": 82
|
|
12767
|
+
},
|
|
12768
|
+
"name": "columns",
|
|
12769
|
+
"type": {
|
|
12770
|
+
"collection": {
|
|
12771
|
+
"elementtype": {
|
|
12772
|
+
"fqn": "cdk-glue-iceberg-table.IcebergColumn"
|
|
12773
|
+
},
|
|
12774
|
+
"kind": "array"
|
|
12775
|
+
}
|
|
12776
|
+
}
|
|
12777
|
+
},
|
|
12778
|
+
{
|
|
12779
|
+
"abstract": true,
|
|
12780
|
+
"docs": {
|
|
12781
|
+
"stability": "experimental",
|
|
12782
|
+
"summary": "Partition spec."
|
|
12783
|
+
},
|
|
12784
|
+
"immutable": true,
|
|
12785
|
+
"locationInModule": {
|
|
12786
|
+
"filename": "lib/iceberg/iceberg-schema-history.ts",
|
|
12787
|
+
"line": 85
|
|
12788
|
+
},
|
|
12789
|
+
"name": "partitionSpec",
|
|
12790
|
+
"optional": true,
|
|
12791
|
+
"type": {
|
|
12792
|
+
"collection": {
|
|
12793
|
+
"elementtype": {
|
|
12794
|
+
"fqn": "cdk-glue-iceberg-table.IcebergPartitionField"
|
|
12795
|
+
},
|
|
12796
|
+
"kind": "array"
|
|
12797
|
+
}
|
|
12798
|
+
}
|
|
12799
|
+
}
|
|
12800
|
+
],
|
|
12801
|
+
"symbolId": "lib/iceberg/iceberg-schema-history:IcebergTableSchema"
|
|
12802
|
+
},
|
|
11949
12803
|
"cdk-glue-iceberg-table.IcebergType": {
|
|
11950
12804
|
"assembly": "cdk-glue-iceberg-table",
|
|
11951
12805
|
"docs": {
|
|
@@ -12211,7 +13065,7 @@
|
|
|
12211
13065
|
},
|
|
12212
13066
|
"locationInModule": {
|
|
12213
13067
|
"filename": "lib/iceberg/iceberg-type.ts",
|
|
12214
|
-
"line":
|
|
13068
|
+
"line": 593
|
|
12215
13069
|
},
|
|
12216
13070
|
"name": "isDecimal",
|
|
12217
13071
|
"returns": {
|
|
@@ -12227,7 +13081,7 @@
|
|
|
12227
13081
|
},
|
|
12228
13082
|
"locationInModule": {
|
|
12229
13083
|
"filename": "lib/iceberg/iceberg-type.ts",
|
|
12230
|
-
"line":
|
|
13084
|
+
"line": 598
|
|
12231
13085
|
},
|
|
12232
13086
|
"name": "isFixed",
|
|
12233
13087
|
"returns": {
|
|
@@ -12243,7 +13097,7 @@
|
|
|
12243
13097
|
},
|
|
12244
13098
|
"locationInModule": {
|
|
12245
13099
|
"filename": "lib/iceberg/iceberg-type.ts",
|
|
12246
|
-
"line":
|
|
13100
|
+
"line": 588
|
|
12247
13101
|
},
|
|
12248
13102
|
"name": "isPrimitive",
|
|
12249
13103
|
"parameters": [
|
|
@@ -13232,6 +14086,6 @@
|
|
|
13232
14086
|
"symbolId": "lib/iceberg/iceberg-type:IcebergTypeOptions"
|
|
13233
14087
|
}
|
|
13234
14088
|
},
|
|
13235
|
-
"version": "0.
|
|
13236
|
-
"fingerprint": "
|
|
14089
|
+
"version": "0.17.0",
|
|
14090
|
+
"fingerprint": "BWP1GPBzR84eetkpO/hZLlsW6B60whe4Pbvkl+LgVOw="
|
|
13237
14091
|
}
|