|
| 1 | +# ICEBERG INTERNAL — Kasanari JDBC catalog manual test pipeline |
| 2 | + |
| 3 | +## Prerequisites |
| 4 | + |
| 5 | +1. `docker compose -f development/docker-compose.yml up -d` |
| 6 | +2. Start Quarkus with dev profile (port 9090, `application-dev.properties`) |
| 7 | +3. Run requests top-to-bottom (use the IDE run gutter on each `shell` block) |
| 8 | + |
| 9 | +Variables below match [`http-client.env.json`](http-client.env.json) `dev` profile. Use a fresh catalog id if re-running section 1. |
| 10 | + |
| 11 | +## 1.1 Register catalog (management) |
| 12 | + |
| 13 | +```shell |
| 14 | +POST http://localhost:9090/management/v1/catalogs |
| 15 | +Authorization: Bearer dev |
| 16 | +Content-Type: application/json |
| 17 | + |
| 18 | +{ |
| 19 | + "catalogId": "dev-iceberg-internal", |
| 20 | + "catalogType": "ICEBERG", |
| 21 | + "mode": "INTERNAL", |
| 22 | + "spec": { |
| 23 | + "fileIoProperties": {}, |
| 24 | + "catalogProperties": { |
| 25 | + "kasanari.jdbc.user": "postgres", |
| 26 | + "kasanari.jdbc.password": "postgres", |
| 27 | + "uri": "jdbc:postgresql://localhost:5432/postgres", |
| 28 | + "warehouse": "s3a://warehouse", |
| 29 | + "io-impl": "org.apache.iceberg.aws.s3.S3FileIO", |
| 30 | + "s3.endpoint": "http://localhost:9000", |
| 31 | + "s3.access-key-id": "admin", |
| 32 | + "s3.secret-access-key": "password", |
| 33 | + "s3.path-style-access": "true", |
| 34 | + "s3.client-factory": "kasanari.fixtures.s3.NoneRegionS3FileIOAwsClientFactory" |
| 35 | + } |
| 36 | + } |
| 37 | +} |
| 38 | +``` |
| 39 | + |
| 40 | +## 1.2 Get catalog metadata (management) |
| 41 | + |
| 42 | +```shell |
| 43 | +GET http://localhost:9090/management/v1/catalogs/ICEBERG/dev-iceberg-internal |
| 44 | +Authorization: Bearer dev |
| 45 | +``` |
| 46 | + |
| 47 | +## 2. Get catalog config (iceberg) |
| 48 | + |
| 49 | +```shell |
| 50 | +GET http://localhost:9090/iceberg/v1/config?warehouse=dev-iceberg-internal |
| 51 | +Authorization: Bearer dev |
| 52 | +``` |
| 53 | + |
| 54 | +## 3.1 List namespaces |
| 55 | + |
| 56 | +```shell |
| 57 | +GET http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces |
| 58 | +Authorization: Bearer dev |
| 59 | +``` |
| 60 | + |
| 61 | +## 3.2 Create namespace |
| 62 | + |
| 63 | +```shell |
| 64 | +POST http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces |
| 65 | +Authorization: Bearer dev |
| 66 | +Content-Type: application/json |
| 67 | + |
| 68 | +{ |
| 69 | + "namespace": ["demo"], |
| 70 | + "properties": {} |
| 71 | +} |
| 72 | +``` |
| 73 | + |
| 74 | +## 3.3 List tables in namespace |
| 75 | + |
| 76 | +```shell |
| 77 | +GET http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces/demo/tables |
| 78 | +Authorization: Bearer dev |
| 79 | +``` |
| 80 | + |
| 81 | +## 3.4 List views in namespace |
| 82 | + |
| 83 | +```shell |
| 84 | +GET http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces/demo/views |
| 85 | +Authorization: Bearer dev |
| 86 | +``` |
| 87 | + |
| 88 | +## 4.1 Create table |
| 89 | + |
| 90 | +```shell |
| 91 | +POST http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces/demo/tables |
| 92 | +Authorization: Bearer dev |
| 93 | +Content-Type: application/json |
| 94 | + |
| 95 | +{ |
| 96 | + "name": "events", |
| 97 | + "location": "s3a://warehouse/demo/events", |
| 98 | + "schema": { |
| 99 | + "type": "struct", |
| 100 | + "fields": [ |
| 101 | + { |
| 102 | + "id": 1, |
| 103 | + "name": "id", |
| 104 | + "type": "long", |
| 105 | + "required": true |
| 106 | + } |
| 107 | + ] |
| 108 | + }, |
| 109 | + "partition-spec": { |
| 110 | + "spec-id": 0, |
| 111 | + "fields": [] |
| 112 | + }, |
| 113 | + "write-order": { |
| 114 | + "order-id": 0, |
| 115 | + "fields": [] |
| 116 | + }, |
| 117 | + "properties": { |
| 118 | + "custom-property": "value" |
| 119 | + } |
| 120 | +} |
| 121 | +``` |
| 122 | + |
| 123 | +## 4.2 Get table (copy metadata.table-uuid for alter) |
| 124 | + |
| 125 | +```shell |
| 126 | +GET http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces/demo/tables/events |
| 127 | +Authorization: Bearer dev |
| 128 | +``` |
| 129 | + |
| 130 | +## 4.3 Alter table (replace TABLE_UUID from 4.2 response) |
| 131 | + |
| 132 | +```shell |
| 133 | +POST http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces/demo/tables/events |
| 134 | +Authorization: Bearer dev |
| 135 | +Content-Type: application/json |
| 136 | + |
| 137 | +{ |
| 138 | + "requirements": [ |
| 139 | + { |
| 140 | + "type": "assert-table-uuid", |
| 141 | + "uuid": "TABLE_UUID" |
| 142 | + } |
| 143 | + ], |
| 144 | + "updates": [ |
| 145 | + { |
| 146 | + "action": "set-properties", |
| 147 | + "updates": { |
| 148 | + "custom-property": "updated-value" |
| 149 | + } |
| 150 | + } |
| 151 | + ] |
| 152 | +} |
| 153 | +``` |
| 154 | + |
| 155 | +## 4.4 Drop table |
| 156 | + |
| 157 | +```shell |
| 158 | +DELETE http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces/demo/tables/events |
| 159 | +Authorization: Bearer dev |
| 160 | +``` |
| 161 | + |
| 162 | +## 5. Cleanup — delete catalog metadata (optional) |
| 163 | + |
| 164 | +```shell |
| 165 | +DELETE http://localhost:9090/management/v1/catalogs/ICEBERG/dev-iceberg-internal |
| 166 | +Authorization: Bearer dev |
| 167 | +``` |
0 commit comments