cdk-glue-iceberg-table 0.4.2 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +70 -71
- package/README.md +11 -0
- package/dist/lib/iceberg/iceberg-partition-transform.js +1 -1
- package/dist/lib/iceberg/iceberg-table-properties.js +1 -1
- package/dist/lib/iceberg/iceberg-table-render.js +17 -26
- package/dist/lib/iceberg/iceberg-table.d.ts +10 -8
- package/dist/lib/iceberg/iceberg-table.js +2 -2
- package/dist/lib/iceberg/iceberg-type.d.ts +1 -1
- package/dist/lib/iceberg/iceberg-type.js +15 -3
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -9070,7 +9070,7 @@
|
|
|
9070
9070
|
},
|
|
9071
9071
|
"name": "cdk-glue-iceberg-table",
|
|
9072
9072
|
"readme": {
|
|
9073
|
-
"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://www.npmjs.com/package/cdk-glue-iceberg-table)\n[](https://github.com/ksco92/arceus/commits/main)\n[](LICENSE)\n\n**`cdk-glue-iceberg-table` is the AWS CDK L2 construct for creating\nand evolving Apache Iceberg tables in the AWS Glue Data Catalog.** It\nemits the exact `AWS::Glue::Table` / `OpenTableFormatInput` shape that\nsurvives a CloudFormation `Update`, so a single `cdk deploy` creates a\ntable, evolves its schema and partitions, and destroys it, the same\nlifecycle CDK gives any other resource. No custom resource, no Lambda,\nno \"`cdk deploy` and then run this SQL by hand\" two-step. Table\nchanges (new columns, renames, drops, new partition fields) land as\na reviewed diff in a pull request and apply through `cdk deploy`.\n\nStatus (June 2026): published on npm (TypeScript/JavaScript) and PyPI\n(Python), pre-1.0, with a public surface guarded by an end-to-end\nconsumer test on every PR plus three real-AWS integration suites. The\nmulti-language packages are generated from one TypeScript source with\n[jsii](https://aws.github.io/jsii/) and indexed on\n[Construct Hub](https://constructs.dev/packages/cdk-glue-iceberg-table).\nDeveloped in the\n[`ksco92/arceus`](https://github.com/ksco92/arceus) monorepo, which\nalso holds a CDK demo app that dogfoods the construct against a real\nAWS 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 so schema evolution never orphans existing data. It is the basis\nof the 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));\nthis package tracks that proposal and stays current with it.\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 / 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). For\nTypeScript / JavaScript:\n\n```bash\nnpm install aws-cdk-lib constructs @aws-cdk/aws-glue-alpha\n```\n\nFor Python:\n\n```bash\npip install aws-cdk-lib constructs aws-cdk.aws-glue-alpha\n```\n\n## Use\n\n### TypeScript\n\n```ts\nimport { Bucket } from 'aws-cdk-lib/aws-s3';\nimport { Database } from '@aws-cdk/aws-glue-alpha';\nimport {\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 },\n { sourceColumn: 'customer_id', transform: IcebergPartitionTransform.bucket(16) },\n ],\n identifierFieldNames: ['order_id'],\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_alpha import Database\nfrom cdk_glue_iceberg_table import (\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},\n {\"source_column\": \"customer_id\", \"transform\": IcebergPartitionTransform.bucket(16)},\n ],\n identifier_field_names=[\"order_id\"],\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- [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 everything 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` and the `fromIcebergTableAttributes(...)` import factory.\n- **`IcebergType`** — primitive types plus `list` / `map` / `struct` / `decimal` / `fixed` factories. Renders to the JSON shape 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, required — set explicitly per table), **`IcebergSortDirection`**, **`IcebergNullOrder`**, 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 Database,\n} from '@aws-cdk/aws-glue-alpha';\nimport {\n IcebergTable,\n IcebergType,\n} from 'cdk-glue-iceberg-table';\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});\n```\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/aws-glue-alpha';\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(IcebergType.STRING),\n id: 6,\n },\n {\n name: 'shipping_address',\n type: IcebergType.struct([\n {\n name: 'line1',\n type: IcebergType.STRING,\n required: true,\n },\n {\n name: 'city',\n type: IcebergType.STRING,\n required: true,\n },\n {\n name: 'country',\n type: IcebergType.STRING,\n required: true,\n },\n {\n name: 'postal_code',\n type: IcebergType.STRING,\n },\n ]),\n id: 7,\n },\n {\n name: 'metadata',\n type: IcebergType.map(IcebergType.STRING, IcebergType.STRING, false),\n id: 8,\n },\n ],\n location: `s3://${bucket.bucketName}/analytics/orders/`,\n partitionSpec: [\n {\n sourceColumn: 'placed_at',\n transform: IcebergPartitionTransform.DAY,\n },\n {\n sourceColumn: 'customer_id',\n transform: IcebergPartitionTransform.bucket(16),\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\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\" },\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\": true } },\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### 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 and\nnever reused. Adds, renames (same `id`, new `name`), and drops all\nflow through `cdk deploy` alone — no out-of-band SQL DDL. The same\napplies to `partitionSpec`.\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- **Field-id reuse is not detected across deploys.** 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 column id N` validator), but it doesn't compare against the live table state. The safe workflow is to always pin `id` explicitly and treat dropped ids as retired forever; never let CDK reassign an id that has ever been used.\n- **Partition field ids are positional and not pinnable.** The construct allocates partition `fieldId` densely from 1000 in the order partitions appear in `partitionSpec`. Reordering the array across deploys reassigns those ids for unchanged logical partitions, which is the partition-spec analog of the column-id-reuse footgun above. There is no `IcebergPartitionField.fieldId` pinning prop today. The safe workflow is append-only: add new partition fields at the end of `partitionSpec`, and only drop the trailing ones.\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.** The `formatVersion` prop is read once at table creation; changing it later requires a destroy + recreate.\n- **`merge-on-read` requires v2.** The construct rejects `write.{delete,update,merge}.mode = merge-on-read` on a v1 table at synth time.\n- **Athena DDL features that don't surface through CFN** (e.g. `ALTER TABLE WRITE ORDERED BY`, `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 and never reused. The\nsame applies to `partitionSpec`. See [Evolving schema and\npartitions](#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, and `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 transform is validated against its source column's type\nat synth time. See [Using `IcebergTable`](#using-icebergtable).\n\n### Does it work with Athena and Lake Formation?\n\nYes. The demo app in the [`arceus`](https://github.com/ksco92/arceus)\nrepo registers the tables with Lake Formation and queries them from\nAthena, including v2 merge-on-read `INSERT` / `UPDATE` / `DELETE` /\n`MERGE`, time travel, `OPTIMIZE`, and `VACUUM`. The construct's\n`grant*` helpers issue IAM grants; under Lake Formation you still add\nthe matching `SELECT` / `INSERT` LF grants. See [Granting\naccess](#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## 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](LICENSE).\n"
|
|
9073
|
+
"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://www.npmjs.com/package/cdk-glue-iceberg-table)\n[](https://github.com/ksco92/arceus/commits/main)\n[](LICENSE)\n\n**`cdk-glue-iceberg-table` is the AWS CDK L2 construct for creating\nand evolving Apache Iceberg tables in the AWS Glue Data Catalog.** It\nemits the exact `AWS::Glue::Table` / `OpenTableFormatInput` shape that\nsurvives a CloudFormation `Update`, so a single `cdk deploy` creates a\ntable, evolves its schema and partitions, and destroys it, the same\nlifecycle CDK gives any other resource. No custom resource, no Lambda,\nno \"`cdk deploy` and then run this SQL by hand\" two-step. Table\nchanges (new columns, renames, drops, new partition fields) land as\na reviewed diff in a pull request and apply through `cdk deploy`.\n\nStatus (June 2026): published on npm (TypeScript/JavaScript) and PyPI\n(Python), pre-1.0, with a public surface guarded by an end-to-end\nconsumer test on every PR plus three real-AWS integration suites. The\nmulti-language packages are generated from one TypeScript source with\n[jsii](https://aws.github.io/jsii/) and indexed on\n[Construct Hub](https://constructs.dev/packages/cdk-glue-iceberg-table).\nDeveloped in the\n[`ksco92/arceus`](https://github.com/ksco92/arceus) monorepo, which\nalso holds a CDK demo app that dogfoods the construct against a real\nAWS 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 so schema evolution never orphans existing data. It is the basis\nof the 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));\nthis package tracks that proposal and stays current with it.\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 / 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). For\nTypeScript / JavaScript:\n\n```bash\nnpm install aws-cdk-lib constructs @aws-cdk/aws-glue-alpha\n```\n\nFor Python:\n\n```bash\npip install aws-cdk-lib constructs aws-cdk.aws-glue-alpha\n```\n\n## Use\n\n### TypeScript\n\n```ts\nimport { Bucket } from 'aws-cdk-lib/aws-s3';\nimport { Database } from '@aws-cdk/aws-glue-alpha';\nimport {\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 },\n { sourceColumn: 'customer_id', transform: IcebergPartitionTransform.bucket(16) },\n ],\n identifierFieldNames: ['order_id'],\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_alpha import Database\nfrom cdk_glue_iceberg_table import (\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},\n {\"source_column\": \"customer_id\", \"transform\": IcebergPartitionTransform.bucket(16)},\n ],\n identifier_field_names=[\"order_id\"],\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- [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 everything 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` and the `fromIcebergTableAttributes(...)` import factory.\n- **`IcebergType`** — primitive types plus `list` / `map` / `struct` / `decimal` / `fixed` factories. Renders to the JSON shape 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, required — set explicitly per table), **`IcebergSortDirection`**, **`IcebergNullOrder`**, 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 Database,\n} from '@aws-cdk/aws-glue-alpha';\nimport {\n IcebergTable,\n IcebergType,\n} from 'cdk-glue-iceberg-table';\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});\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 is what lets you add, rename, and drop columns across deploys\nwithout corrupting 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 struct/list/map field ids are assigned automatically\nabove the highest top-level id — only top-level column ids are\ncaller-provided.)\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/aws-glue-alpha';\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(IcebergType.STRING),\n id: 6,\n },\n {\n name: 'shipping_address',\n type: IcebergType.struct([\n {\n name: 'line1',\n type: IcebergType.STRING,\n required: true,\n },\n {\n name: 'city',\n type: IcebergType.STRING,\n required: true,\n },\n {\n name: 'country',\n type: IcebergType.STRING,\n required: true,\n },\n {\n name: 'postal_code',\n type: IcebergType.STRING,\n },\n ]),\n id: 7,\n },\n {\n name: 'metadata',\n type: IcebergType.map(IcebergType.STRING, IcebergType.STRING, false),\n id: 8,\n },\n ],\n location: `s3://${bucket.bucketName}/analytics/orders/`,\n partitionSpec: [\n {\n sourceColumn: 'placed_at',\n transform: IcebergPartitionTransform.DAY,\n },\n {\n sourceColumn: 'customer_id',\n transform: IcebergPartitionTransform.bucket(16),\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\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\" },\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\": true } },\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### 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 and\nnever reused. Adds, renames (same `id`, new `name`), and drops all\nflow through `cdk deploy` alone — no out-of-band SQL DDL. The same\napplies to `partitionSpec`.\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- **Field-id reuse is not detected across deploys.** 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 column id N` validator), but it doesn't compare against the live table state. The safe workflow is to always pin `id` explicitly and treat dropped ids as retired forever; never let CDK reassign an id that has ever been used.\n- **Partition field ids are positional and not pinnable.** The construct allocates partition `fieldId` densely from 1000 in the order partitions appear in `partitionSpec`. Reordering the array across deploys reassigns those ids for unchanged logical partitions, which is the partition-spec analog of the column-id-reuse footgun above. There is no `IcebergPartitionField.fieldId` pinning prop today. The safe workflow is append-only: add new partition fields at the end of `partitionSpec`, and only drop the trailing ones.\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.** The `formatVersion` prop is read once at table creation; changing it later requires a destroy + recreate.\n- **`merge-on-read` requires v2.** The construct rejects `write.{delete,update,merge}.mode = merge-on-read` on a v1 table at synth time.\n- **Athena DDL features that don't surface through CFN** (e.g. `ALTER TABLE WRITE ORDERED BY`, `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 and never reused. The\nsame applies to `partitionSpec`. See [Evolving schema and\npartitions](#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, and `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 transform is validated against its source column's type\nat synth time. See [Using `IcebergTable`](#using-icebergtable).\n\n### Does it work with Athena and Lake Formation?\n\nYes. The demo app in the [`arceus`](https://github.com/ksco92/arceus)\nrepo registers the tables with Lake Formation and queries them from\nAthena, including v2 merge-on-read `INSERT` / `UPDATE` / `DELETE` /\n`MERGE`, time travel, `OPTIMIZE`, and `VACUUM`. The construct's\n`grant*` helpers issue IAM grants; under Lake Formation you still add\nthe matching `SELECT` / `INSERT` LF grants. See [Granting\naccess](#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## 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](LICENSE).\n"
|
|
9074
9074
|
},
|
|
9075
9075
|
"repository": {
|
|
9076
9076
|
"directory": "packages/cdk-glue-iceberg-table",
|
|
@@ -9098,7 +9098,7 @@
|
|
|
9098
9098
|
"kind": "interface",
|
|
9099
9099
|
"locationInModule": {
|
|
9100
9100
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9101
|
-
"line":
|
|
9101
|
+
"line": 203
|
|
9102
9102
|
},
|
|
9103
9103
|
"methods": [
|
|
9104
9104
|
{
|
|
@@ -9109,7 +9109,7 @@
|
|
|
9109
9109
|
},
|
|
9110
9110
|
"locationInModule": {
|
|
9111
9111
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9112
|
-
"line":
|
|
9112
|
+
"line": 217
|
|
9113
9113
|
},
|
|
9114
9114
|
"name": "grantRead",
|
|
9115
9115
|
"parameters": [
|
|
@@ -9134,7 +9134,7 @@
|
|
|
9134
9134
|
},
|
|
9135
9135
|
"locationInModule": {
|
|
9136
9136
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9137
|
-
"line":
|
|
9137
|
+
"line": 223
|
|
9138
9138
|
},
|
|
9139
9139
|
"name": "grantReadWrite",
|
|
9140
9140
|
"parameters": [
|
|
@@ -9159,7 +9159,7 @@
|
|
|
9159
9159
|
},
|
|
9160
9160
|
"locationInModule": {
|
|
9161
9161
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9162
|
-
"line":
|
|
9162
|
+
"line": 220
|
|
9163
9163
|
},
|
|
9164
9164
|
"name": "grantWrite",
|
|
9165
9165
|
"parameters": [
|
|
@@ -9188,7 +9188,7 @@
|
|
|
9188
9188
|
"immutable": true,
|
|
9189
9189
|
"locationInModule": {
|
|
9190
9190
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9191
|
-
"line":
|
|
9191
|
+
"line": 211
|
|
9192
9192
|
},
|
|
9193
9193
|
"name": "database",
|
|
9194
9194
|
"type": {
|
|
@@ -9204,7 +9204,7 @@
|
|
|
9204
9204
|
"immutable": true,
|
|
9205
9205
|
"locationInModule": {
|
|
9206
9206
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9207
|
-
"line":
|
|
9207
|
+
"line": 214
|
|
9208
9208
|
},
|
|
9209
9209
|
"name": "location",
|
|
9210
9210
|
"type": {
|
|
@@ -9220,7 +9220,7 @@
|
|
|
9220
9220
|
"immutable": true,
|
|
9221
9221
|
"locationInModule": {
|
|
9222
9222
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9223
|
-
"line":
|
|
9223
|
+
"line": 205
|
|
9224
9224
|
},
|
|
9225
9225
|
"name": "tableArn",
|
|
9226
9226
|
"type": {
|
|
@@ -9236,7 +9236,7 @@
|
|
|
9236
9236
|
"immutable": true,
|
|
9237
9237
|
"locationInModule": {
|
|
9238
9238
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9239
|
-
"line":
|
|
9239
|
+
"line": 208
|
|
9240
9240
|
},
|
|
9241
9241
|
"name": "tableName",
|
|
9242
9242
|
"type": {
|
|
@@ -9264,68 +9264,67 @@
|
|
|
9264
9264
|
{
|
|
9265
9265
|
"abstract": true,
|
|
9266
9266
|
"docs": {
|
|
9267
|
+
"remarks": "Required: every top-level\ncolumn must be pinned to a stable, unique positive integer that\nyou never reuse or reassign across deploys. That stability is the\nwhole point — because data files reference fields by id, a fixed\nid lets you add, remove, and reorder columns safely without\ntriggering Iceberg's silent-corruption-on-id-reuse trap. Pick the\nid once when you add the column and never change it; once a column\nis dropped, leave its id retired rather than giving it to a new\ncolumn.",
|
|
9267
9268
|
"stability": "experimental",
|
|
9268
|
-
"summary": "
|
|
9269
|
+
"summary": "Iceberg field id for this column."
|
|
9269
9270
|
},
|
|
9270
9271
|
"immutable": true,
|
|
9271
9272
|
"locationInModule": {
|
|
9272
9273
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9273
|
-
"line":
|
|
9274
|
+
"line": 107
|
|
9274
9275
|
},
|
|
9275
|
-
"name": "
|
|
9276
|
+
"name": "id",
|
|
9276
9277
|
"type": {
|
|
9277
|
-
"primitive": "
|
|
9278
|
+
"primitive": "number"
|
|
9278
9279
|
}
|
|
9279
9280
|
},
|
|
9280
9281
|
{
|
|
9281
9282
|
"abstract": true,
|
|
9282
9283
|
"docs": {
|
|
9283
9284
|
"stability": "experimental",
|
|
9284
|
-
"summary": "Column
|
|
9285
|
+
"summary": "Column name (unique within the table)."
|
|
9285
9286
|
},
|
|
9286
9287
|
"immutable": true,
|
|
9287
9288
|
"locationInModule": {
|
|
9288
9289
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9289
|
-
"line":
|
|
9290
|
+
"line": 82
|
|
9290
9291
|
},
|
|
9291
|
-
"name": "
|
|
9292
|
+
"name": "name",
|
|
9292
9293
|
"type": {
|
|
9293
|
-
"
|
|
9294
|
+
"primitive": "string"
|
|
9294
9295
|
}
|
|
9295
9296
|
},
|
|
9296
9297
|
{
|
|
9297
9298
|
"abstract": true,
|
|
9298
9299
|
"docs": {
|
|
9299
9300
|
"stability": "experimental",
|
|
9300
|
-
"summary": "
|
|
9301
|
+
"summary": "Column type."
|
|
9301
9302
|
},
|
|
9302
9303
|
"immutable": true,
|
|
9303
9304
|
"locationInModule": {
|
|
9304
9305
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9305
|
-
"line":
|
|
9306
|
+
"line": 85
|
|
9306
9307
|
},
|
|
9307
|
-
"name": "
|
|
9308
|
-
"optional": true,
|
|
9308
|
+
"name": "type",
|
|
9309
9309
|
"type": {
|
|
9310
|
-
"
|
|
9310
|
+
"fqn": "cdk-glue-iceberg-table.IcebergType"
|
|
9311
9311
|
}
|
|
9312
9312
|
},
|
|
9313
9313
|
{
|
|
9314
9314
|
"abstract": true,
|
|
9315
9315
|
"docs": {
|
|
9316
|
-
"remarks": "Highly\nrecommended for production tables: it lets you safely add,\nremove, and reorder columns across `cdk deploy`s without\ntriggering Iceberg's silent-corruption-on-id-reuse trap. When\nomitted the construct assigns ids by position (1..N for the\ntop-level columns), which is fine for fresh tables but unsafe\nonce the table has data and you start dropping columns.",
|
|
9317
9316
|
"stability": "experimental",
|
|
9318
|
-
"summary": "
|
|
9317
|
+
"summary": "Optional documentation string."
|
|
9319
9318
|
},
|
|
9320
9319
|
"immutable": true,
|
|
9321
9320
|
"locationInModule": {
|
|
9322
9321
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9323
|
-
"line":
|
|
9322
|
+
"line": 94
|
|
9324
9323
|
},
|
|
9325
|
-
"name": "
|
|
9324
|
+
"name": "doc",
|
|
9326
9325
|
"optional": true,
|
|
9327
9326
|
"type": {
|
|
9328
|
-
"primitive": "
|
|
9327
|
+
"primitive": "string"
|
|
9329
9328
|
}
|
|
9330
9329
|
},
|
|
9331
9330
|
{
|
|
@@ -9461,7 +9460,7 @@
|
|
|
9461
9460
|
"kind": "interface",
|
|
9462
9461
|
"locationInModule": {
|
|
9463
9462
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9464
|
-
"line":
|
|
9463
|
+
"line": 111
|
|
9465
9464
|
},
|
|
9466
9465
|
"name": "IcebergPartitionField",
|
|
9467
9466
|
"properties": [
|
|
@@ -9474,7 +9473,7 @@
|
|
|
9474
9473
|
"immutable": true,
|
|
9475
9474
|
"locationInModule": {
|
|
9476
9475
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9477
|
-
"line":
|
|
9476
|
+
"line": 113
|
|
9478
9477
|
},
|
|
9479
9478
|
"name": "sourceColumn",
|
|
9480
9479
|
"type": {
|
|
@@ -9490,7 +9489,7 @@
|
|
|
9490
9489
|
"immutable": true,
|
|
9491
9490
|
"locationInModule": {
|
|
9492
9491
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9493
|
-
"line":
|
|
9492
|
+
"line": 116
|
|
9494
9493
|
},
|
|
9495
9494
|
"name": "transform",
|
|
9496
9495
|
"type": {
|
|
@@ -9507,7 +9506,7 @@
|
|
|
9507
9506
|
"immutable": true,
|
|
9508
9507
|
"locationInModule": {
|
|
9509
9508
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
9510
|
-
"line":
|
|
9509
|
+
"line": 123
|
|
9511
9510
|
},
|
|
9512
9511
|
"name": "name",
|
|
9513
9512
|
"optional": true,
|
|
@@ -10216,7 +10215,7 @@
|
|
|
10216
10215
|
"kind": "interface",
|
|
10217
10216
|
"locationInModule": {
|
|
10218
10217
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10219
|
-
"line":
|
|
10218
|
+
"line": 127
|
|
10220
10219
|
},
|
|
10221
10220
|
"name": "IcebergSortField",
|
|
10222
10221
|
"properties": [
|
|
@@ -10229,7 +10228,7 @@
|
|
|
10229
10228
|
"immutable": true,
|
|
10230
10229
|
"locationInModule": {
|
|
10231
10230
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10232
|
-
"line":
|
|
10231
|
+
"line": 129
|
|
10233
10232
|
},
|
|
10234
10233
|
"name": "sourceColumn",
|
|
10235
10234
|
"type": {
|
|
@@ -10246,7 +10245,7 @@
|
|
|
10246
10245
|
"immutable": true,
|
|
10247
10246
|
"locationInModule": {
|
|
10248
10247
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10249
|
-
"line":
|
|
10248
|
+
"line": 135
|
|
10250
10249
|
},
|
|
10251
10250
|
"name": "direction",
|
|
10252
10251
|
"optional": true,
|
|
@@ -10264,7 +10263,7 @@
|
|
|
10264
10263
|
"immutable": true,
|
|
10265
10264
|
"locationInModule": {
|
|
10266
10265
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10267
|
-
"line":
|
|
10266
|
+
"line": 138
|
|
10268
10267
|
},
|
|
10269
10268
|
"name": "nullOrder",
|
|
10270
10269
|
"optional": true,
|
|
@@ -10282,7 +10281,7 @@
|
|
|
10282
10281
|
"immutable": true,
|
|
10283
10282
|
"locationInModule": {
|
|
10284
10283
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10285
|
-
"line":
|
|
10284
|
+
"line": 132
|
|
10286
10285
|
},
|
|
10287
10286
|
"name": "transform",
|
|
10288
10287
|
"optional": true,
|
|
@@ -10393,7 +10392,7 @@
|
|
|
10393
10392
|
},
|
|
10394
10393
|
"locationInModule": {
|
|
10395
10394
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10396
|
-
"line":
|
|
10395
|
+
"line": 266
|
|
10397
10396
|
},
|
|
10398
10397
|
"parameters": [
|
|
10399
10398
|
{
|
|
@@ -10422,7 +10421,7 @@
|
|
|
10422
10421
|
"kind": "class",
|
|
10423
10422
|
"locationInModule": {
|
|
10424
10423
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10425
|
-
"line":
|
|
10424
|
+
"line": 240
|
|
10426
10425
|
},
|
|
10427
10426
|
"methods": [
|
|
10428
10427
|
{
|
|
@@ -10433,7 +10432,7 @@
|
|
|
10433
10432
|
},
|
|
10434
10433
|
"locationInModule": {
|
|
10435
10434
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10436
|
-
"line":
|
|
10435
|
+
"line": 339
|
|
10437
10436
|
},
|
|
10438
10437
|
"name": "fromIcebergTableAttributes",
|
|
10439
10438
|
"parameters": [
|
|
@@ -10470,7 +10469,7 @@
|
|
|
10470
10469
|
},
|
|
10471
10470
|
"locationInModule": {
|
|
10472
10471
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10473
|
-
"line":
|
|
10472
|
+
"line": 418
|
|
10474
10473
|
},
|
|
10475
10474
|
"name": "grantRead",
|
|
10476
10475
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -10495,7 +10494,7 @@
|
|
|
10495
10494
|
},
|
|
10496
10495
|
"locationInModule": {
|
|
10497
10496
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10498
|
-
"line":
|
|
10497
|
+
"line": 446
|
|
10499
10498
|
},
|
|
10500
10499
|
"name": "grantReadWrite",
|
|
10501
10500
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -10520,7 +10519,7 @@
|
|
|
10520
10519
|
},
|
|
10521
10520
|
"locationInModule": {
|
|
10522
10521
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10523
|
-
"line":
|
|
10522
|
+
"line": 432
|
|
10524
10523
|
},
|
|
10525
10524
|
"name": "grantWrite",
|
|
10526
10525
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -10549,7 +10548,7 @@
|
|
|
10549
10548
|
"immutable": true,
|
|
10550
10549
|
"locationInModule": {
|
|
10551
10550
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10552
|
-
"line":
|
|
10551
|
+
"line": 248
|
|
10553
10552
|
},
|
|
10554
10553
|
"name": "database",
|
|
10555
10554
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -10565,7 +10564,7 @@
|
|
|
10565
10564
|
"immutable": true,
|
|
10566
10565
|
"locationInModule": {
|
|
10567
10566
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10568
|
-
"line":
|
|
10567
|
+
"line": 254
|
|
10569
10568
|
},
|
|
10570
10569
|
"name": "dataFormat",
|
|
10571
10570
|
"type": {
|
|
@@ -10580,7 +10579,7 @@
|
|
|
10580
10579
|
"immutable": true,
|
|
10581
10580
|
"locationInModule": {
|
|
10582
10581
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10583
|
-
"line":
|
|
10582
|
+
"line": 257
|
|
10584
10583
|
},
|
|
10585
10584
|
"name": "formatVersion",
|
|
10586
10585
|
"type": {
|
|
@@ -10595,7 +10594,7 @@
|
|
|
10595
10594
|
"immutable": true,
|
|
10596
10595
|
"locationInModule": {
|
|
10597
10596
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10598
|
-
"line":
|
|
10597
|
+
"line": 251
|
|
10599
10598
|
},
|
|
10600
10599
|
"name": "location",
|
|
10601
10600
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -10611,7 +10610,7 @@
|
|
|
10611
10610
|
"immutable": true,
|
|
10612
10611
|
"locationInModule": {
|
|
10613
10612
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10614
|
-
"line":
|
|
10613
|
+
"line": 260
|
|
10615
10614
|
},
|
|
10616
10615
|
"name": "resource",
|
|
10617
10616
|
"type": {
|
|
@@ -10626,7 +10625,7 @@
|
|
|
10626
10625
|
"immutable": true,
|
|
10627
10626
|
"locationInModule": {
|
|
10628
10627
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10629
|
-
"line":
|
|
10628
|
+
"line": 242
|
|
10630
10629
|
},
|
|
10631
10630
|
"name": "tableArn",
|
|
10632
10631
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -10642,7 +10641,7 @@
|
|
|
10642
10641
|
"immutable": true,
|
|
10643
10642
|
"locationInModule": {
|
|
10644
10643
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10645
|
-
"line":
|
|
10644
|
+
"line": 245
|
|
10646
10645
|
},
|
|
10647
10646
|
"name": "tableName",
|
|
10648
10647
|
"overrides": "cdk-glue-iceberg-table.IIcebergTable",
|
|
@@ -10664,7 +10663,7 @@
|
|
|
10664
10663
|
"kind": "interface",
|
|
10665
10664
|
"locationInModule": {
|
|
10666
10665
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10667
|
-
"line":
|
|
10666
|
+
"line": 470
|
|
10668
10667
|
},
|
|
10669
10668
|
"name": "IcebergTableAttributes",
|
|
10670
10669
|
"properties": [
|
|
@@ -10677,7 +10676,7 @@
|
|
|
10677
10676
|
"immutable": true,
|
|
10678
10677
|
"locationInModule": {
|
|
10679
10678
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10680
|
-
"line":
|
|
10679
|
+
"line": 472
|
|
10681
10680
|
},
|
|
10682
10681
|
"name": "database",
|
|
10683
10682
|
"type": {
|
|
@@ -10693,7 +10692,7 @@
|
|
|
10693
10692
|
"immutable": true,
|
|
10694
10693
|
"locationInModule": {
|
|
10695
10694
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10696
|
-
"line":
|
|
10695
|
+
"line": 478
|
|
10697
10696
|
},
|
|
10698
10697
|
"name": "location",
|
|
10699
10698
|
"type": {
|
|
@@ -10709,7 +10708,7 @@
|
|
|
10709
10708
|
"immutable": true,
|
|
10710
10709
|
"locationInModule": {
|
|
10711
10710
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10712
|
-
"line":
|
|
10711
|
+
"line": 475
|
|
10713
10712
|
},
|
|
10714
10713
|
"name": "tableName",
|
|
10715
10714
|
"type": {
|
|
@@ -10730,7 +10729,7 @@
|
|
|
10730
10729
|
"kind": "interface",
|
|
10731
10730
|
"locationInModule": {
|
|
10732
10731
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10733
|
-
"line":
|
|
10732
|
+
"line": 142
|
|
10734
10733
|
},
|
|
10735
10734
|
"name": "IcebergTableProps",
|
|
10736
10735
|
"properties": [
|
|
@@ -10744,7 +10743,7 @@
|
|
|
10744
10743
|
"immutable": true,
|
|
10745
10744
|
"locationInModule": {
|
|
10746
10745
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10747
|
-
"line":
|
|
10746
|
+
"line": 150
|
|
10748
10747
|
},
|
|
10749
10748
|
"name": "columns",
|
|
10750
10749
|
"type": {
|
|
@@ -10765,7 +10764,7 @@
|
|
|
10765
10764
|
"immutable": true,
|
|
10766
10765
|
"locationInModule": {
|
|
10767
10766
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10768
|
-
"line":
|
|
10767
|
+
"line": 144
|
|
10769
10768
|
},
|
|
10770
10769
|
"name": "database",
|
|
10771
10770
|
"type": {
|
|
@@ -10782,7 +10781,7 @@
|
|
|
10782
10781
|
"immutable": true,
|
|
10783
10782
|
"locationInModule": {
|
|
10784
10783
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10785
|
-
"line":
|
|
10784
|
+
"line": 172
|
|
10786
10785
|
},
|
|
10787
10786
|
"name": "formatVersion",
|
|
10788
10787
|
"type": {
|
|
@@ -10799,7 +10798,7 @@
|
|
|
10799
10798
|
"immutable": true,
|
|
10800
10799
|
"locationInModule": {
|
|
10801
10800
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10802
|
-
"line":
|
|
10801
|
+
"line": 153
|
|
10803
10802
|
},
|
|
10804
10803
|
"name": "location",
|
|
10805
10804
|
"type": {
|
|
@@ -10815,7 +10814,7 @@
|
|
|
10815
10814
|
"immutable": true,
|
|
10816
10815
|
"locationInModule": {
|
|
10817
10816
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10818
|
-
"line":
|
|
10817
|
+
"line": 147
|
|
10819
10818
|
},
|
|
10820
10819
|
"name": "tableName",
|
|
10821
10820
|
"type": {
|
|
@@ -10832,7 +10831,7 @@
|
|
|
10832
10831
|
"immutable": true,
|
|
10833
10832
|
"locationInModule": {
|
|
10834
10833
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10835
|
-
"line":
|
|
10834
|
+
"line": 192
|
|
10836
10835
|
},
|
|
10837
10836
|
"name": "comment",
|
|
10838
10837
|
"optional": true,
|
|
@@ -10850,7 +10849,7 @@
|
|
|
10850
10849
|
"immutable": true,
|
|
10851
10850
|
"locationInModule": {
|
|
10852
10851
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10853
|
-
"line":
|
|
10852
|
+
"line": 169
|
|
10854
10853
|
},
|
|
10855
10854
|
"name": "dataFormat",
|
|
10856
10855
|
"optional": true,
|
|
@@ -10868,7 +10867,7 @@
|
|
|
10868
10867
|
"immutable": true,
|
|
10869
10868
|
"locationInModule": {
|
|
10870
10869
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10871
|
-
"line":
|
|
10870
|
+
"line": 166
|
|
10872
10871
|
},
|
|
10873
10872
|
"name": "identifierFieldNames",
|
|
10874
10873
|
"optional": true,
|
|
@@ -10891,7 +10890,7 @@
|
|
|
10891
10890
|
"immutable": true,
|
|
10892
10891
|
"locationInModule": {
|
|
10893
10892
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10894
|
-
"line":
|
|
10893
|
+
"line": 156
|
|
10895
10894
|
},
|
|
10896
10895
|
"name": "partitionSpec",
|
|
10897
10896
|
"optional": true,
|
|
@@ -10914,7 +10913,7 @@
|
|
|
10914
10913
|
"immutable": true,
|
|
10915
10914
|
"locationInModule": {
|
|
10916
10915
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10917
|
-
"line":
|
|
10916
|
+
"line": 199
|
|
10918
10917
|
},
|
|
10919
10918
|
"name": "removalPolicy",
|
|
10920
10919
|
"optional": true,
|
|
@@ -10932,7 +10931,7 @@
|
|
|
10932
10931
|
"immutable": true,
|
|
10933
10932
|
"locationInModule": {
|
|
10934
10933
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10935
|
-
"line":
|
|
10934
|
+
"line": 159
|
|
10936
10935
|
},
|
|
10937
10936
|
"name": "sortOrder",
|
|
10938
10937
|
"optional": true,
|
|
@@ -10955,7 +10954,7 @@
|
|
|
10955
10954
|
"immutable": true,
|
|
10956
10955
|
"locationInModule": {
|
|
10957
10956
|
"filename": "lib/iceberg/iceberg-table.ts",
|
|
10958
|
-
"line":
|
|
10957
|
+
"line": 181
|
|
10959
10958
|
},
|
|
10960
10959
|
"name": "tableProperties",
|
|
10961
10960
|
"optional": true,
|
|
@@ -11195,7 +11194,7 @@
|
|
|
11195
11194
|
},
|
|
11196
11195
|
"locationInModule": {
|
|
11197
11196
|
"filename": "lib/iceberg/iceberg-type.ts",
|
|
11198
|
-
"line":
|
|
11197
|
+
"line": 447
|
|
11199
11198
|
},
|
|
11200
11199
|
"name": "isDecimal",
|
|
11201
11200
|
"returns": {
|
|
@@ -11211,7 +11210,7 @@
|
|
|
11211
11210
|
},
|
|
11212
11211
|
"locationInModule": {
|
|
11213
11212
|
"filename": "lib/iceberg/iceberg-type.ts",
|
|
11214
|
-
"line":
|
|
11213
|
+
"line": 452
|
|
11215
11214
|
},
|
|
11216
11215
|
"name": "isFixed",
|
|
11217
11216
|
"returns": {
|
|
@@ -11227,7 +11226,7 @@
|
|
|
11227
11226
|
},
|
|
11228
11227
|
"locationInModule": {
|
|
11229
11228
|
"filename": "lib/iceberg/iceberg-type.ts",
|
|
11230
|
-
"line":
|
|
11229
|
+
"line": 442
|
|
11231
11230
|
},
|
|
11232
11231
|
"name": "isPrimitive",
|
|
11233
11232
|
"parameters": [
|
|
@@ -11938,6 +11937,6 @@
|
|
|
11938
11937
|
"symbolId": "lib/iceberg/iceberg-type:IcebergTypeOptions"
|
|
11939
11938
|
}
|
|
11940
11939
|
},
|
|
11941
|
-
"version": "0.
|
|
11942
|
-
"fingerprint": "
|
|
11940
|
+
"version": "0.5.1",
|
|
11941
|
+
"fingerprint": "Iu5fuHmUUcrH5PLATP3RTcPNH2JS6cTEUTmM8pLzoes="
|
|
11943
11942
|
}
|