@distilled.cloud/starburst-galaxy 0.0.0 → 1.0.0-rc.21

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.
Files changed (190) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +110 -4
  3. package/lib/.lazy.json +1 -0
  4. package/lib/_bundle/lazy.js +4 -0
  5. package/lib/_bundle/sdk.js +2 -0
  6. package/lib/_bundle/sdk.js.map +1 -0
  7. package/lib/credentials.d.ts +84 -0
  8. package/lib/credentials.d.ts.map +1 -0
  9. package/lib/credentials.js +1 -0
  10. package/lib/errors.d.ts +83 -0
  11. package/lib/errors.d.ts.map +1 -0
  12. package/lib/errors.js +1 -0
  13. package/lib/index.d.ts +42 -0
  14. package/lib/index.d.ts.map +1 -0
  15. package/lib/index.js +6 -0
  16. package/lib/pagination.d.ts +10 -0
  17. package/lib/pagination.d.ts.map +1 -0
  18. package/lib/pagination.js +1 -0
  19. package/lib/protocol.d.ts +29 -0
  20. package/lib/protocol.d.ts.map +1 -0
  21. package/lib/protocol.js +1 -0
  22. package/lib/retry.d.ts +32 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +1 -0
  25. package/lib/services/catalog.d.ts +2791 -0
  26. package/lib/services/catalog.d.ts.map +1 -0
  27. package/lib/services/catalog.js +101 -0
  28. package/lib/services/catalog.js.map +1 -0
  29. package/lib/services/cluster.d.ts +248 -0
  30. package/lib/services/cluster.d.ts.map +1 -0
  31. package/lib/services/cluster.js +2 -0
  32. package/lib/services/cluster.js.map +1 -0
  33. package/lib/services/column_mask.d.ts +162 -0
  34. package/lib/services/column_mask.d.ts.map +1 -0
  35. package/lib/services/column_mask.js +2 -0
  36. package/lib/services/column_mask.js.map +1 -0
  37. package/lib/services/cross_account_iam_role.d.ts +133 -0
  38. package/lib/services/cross_account_iam_role.d.ts.map +1 -0
  39. package/lib/services/cross_account_iam_role.js +2 -0
  40. package/lib/services/cross_account_iam_role.js.map +1 -0
  41. package/lib/services/data_domain.d.ts +223 -0
  42. package/lib/services/data_domain.d.ts.map +1 -0
  43. package/lib/services/data_domain.js +2 -0
  44. package/lib/services/data_domain.js.map +1 -0
  45. package/lib/services/data_product.d.ts +290 -0
  46. package/lib/services/data_product.d.ts.map +1 -0
  47. package/lib/services/data_product.js +2 -0
  48. package/lib/services/data_product.js.map +1 -0
  49. package/lib/services/data_product_usage_example.d.ts +158 -0
  50. package/lib/services/data_product_usage_example.d.ts.map +1 -0
  51. package/lib/services/data_product_usage_example.js +2 -0
  52. package/lib/services/data_product_usage_example.js.map +1 -0
  53. package/lib/services/data_quality.d.ts +344 -0
  54. package/lib/services/data_quality.d.ts.map +1 -0
  55. package/lib/services/data_quality.js +2 -0
  56. package/lib/services/data_quality.js.map +1 -0
  57. package/lib/services/data_quality_metrics.d.ts +282 -0
  58. package/lib/services/data_quality_metrics.d.ts.map +1 -0
  59. package/lib/services/data_quality_metrics.js +2 -0
  60. package/lib/services/data_quality_metrics.js.map +1 -0
  61. package/lib/services/data_quality_schedule.d.ts +220 -0
  62. package/lib/services/data_quality_schedule.d.ts.map +1 -0
  63. package/lib/services/data_quality_schedule.js +2 -0
  64. package/lib/services/data_quality_schedule.js.map +1 -0
  65. package/lib/services/discovery.d.ts +439 -0
  66. package/lib/services/discovery.d.ts.map +1 -0
  67. package/lib/services/discovery.js +36 -0
  68. package/lib/services/discovery.js.map +1 -0
  69. package/lib/services/file_ingest_source.d.ts +205 -0
  70. package/lib/services/file_ingest_source.d.ts.map +1 -0
  71. package/lib/services/file_ingest_source.js +2 -0
  72. package/lib/services/file_ingest_source.js.map +1 -0
  73. package/lib/services/group.d.ts +140 -0
  74. package/lib/services/group.d.ts.map +1 -0
  75. package/lib/services/group.js +2 -0
  76. package/lib/services/group.js.map +1 -0
  77. package/lib/services/index.d.ts +26 -0
  78. package/lib/services/index.d.ts.map +1 -0
  79. package/lib/services/index.js +25 -0
  80. package/lib/services/kafka_ingest_source.d.ts +236 -0
  81. package/lib/services/kafka_ingest_source.d.ts.map +1 -0
  82. package/lib/services/kafka_ingest_source.js +2 -0
  83. package/lib/services/kafka_ingest_source.js.map +1 -0
  84. package/lib/services/live_table.d.ts +851 -0
  85. package/lib/services/live_table.d.ts.map +1 -0
  86. package/lib/services/live_table.js +20 -0
  87. package/lib/services/live_table.js.map +1 -0
  88. package/lib/services/policy.d.ts +213 -0
  89. package/lib/services/policy.d.ts.map +1 -0
  90. package/lib/services/policy.js +2 -0
  91. package/lib/services/policy.js.map +1 -0
  92. package/lib/services/privatelink.d.ts +95 -0
  93. package/lib/services/privatelink.d.ts.map +1 -0
  94. package/lib/services/privatelink.js +2 -0
  95. package/lib/services/privatelink.js.map +1 -0
  96. package/lib/services/privilege.d.ts +167 -0
  97. package/lib/services/privilege.d.ts.map +1 -0
  98. package/lib/services/privilege.js +2 -0
  99. package/lib/services/privilege.js.map +1 -0
  100. package/lib/services/role.d.ts +222 -0
  101. package/lib/services/role.d.ts.map +1 -0
  102. package/lib/services/role.js +2 -0
  103. package/lib/services/role.js.map +1 -0
  104. package/lib/services/row_filter.d.ts +155 -0
  105. package/lib/services/row_filter.d.ts.map +1 -0
  106. package/lib/services/row_filter.js +2 -0
  107. package/lib/services/row_filter.js.map +1 -0
  108. package/lib/services/schema_discovery.d.ts +236 -0
  109. package/lib/services/schema_discovery.d.ts.map +1 -0
  110. package/lib/services/schema_discovery.js +2 -0
  111. package/lib/services/schema_discovery.js.map +1 -0
  112. package/lib/services/service_account.d.ts +206 -0
  113. package/lib/services/service_account.d.ts.map +1 -0
  114. package/lib/services/service_account.js +2 -0
  115. package/lib/services/service_account.js.map +1 -0
  116. package/lib/services/sql_jobs.d.ts +264 -0
  117. package/lib/services/sql_jobs.d.ts.map +1 -0
  118. package/lib/services/sql_jobs.js +2 -0
  119. package/lib/services/sql_jobs.js.map +1 -0
  120. package/lib/services/tag.d.ts +287 -0
  121. package/lib/services/tag.d.ts.map +1 -0
  122. package/lib/services/tag.js +2 -0
  123. package/lib/services/tag.js.map +1 -0
  124. package/lib/services/user.d.ts +175 -0
  125. package/lib/services/user.d.ts.map +1 -0
  126. package/lib/services/user.js +2 -0
  127. package/lib/services/user.js.map +1 -0
  128. package/lib/services.lazy/catalog.js +4 -0
  129. package/lib/services.lazy/cluster.js +1 -0
  130. package/lib/services.lazy/column_mask.js +1 -0
  131. package/lib/services.lazy/cross_account_iam_role.js +1 -0
  132. package/lib/services.lazy/data_domain.js +1 -0
  133. package/lib/services.lazy/data_product.js +1 -0
  134. package/lib/services.lazy/data_product_usage_example.js +1 -0
  135. package/lib/services.lazy/data_quality.js +1 -0
  136. package/lib/services.lazy/data_quality_metrics.js +1 -0
  137. package/lib/services.lazy/data_quality_schedule.js +1 -0
  138. package/lib/services.lazy/discovery.js +4 -0
  139. package/lib/services.lazy/file_ingest_source.js +1 -0
  140. package/lib/services.lazy/group.js +1 -0
  141. package/lib/services.lazy/index.js +3 -0
  142. package/lib/services.lazy/kafka_ingest_source.js +1 -0
  143. package/lib/services.lazy/live_table.js +4 -0
  144. package/lib/services.lazy/policy.js +1 -0
  145. package/lib/services.lazy/privatelink.js +1 -0
  146. package/lib/services.lazy/privilege.js +1 -0
  147. package/lib/services.lazy/role.js +1 -0
  148. package/lib/services.lazy/row_filter.js +1 -0
  149. package/lib/services.lazy/schema_discovery.js +1 -0
  150. package/lib/services.lazy/service_account.js +1 -0
  151. package/lib/services.lazy/sql_jobs.js +1 -0
  152. package/lib/services.lazy/tag.js +1 -0
  153. package/lib/services.lazy/user.js +1 -0
  154. package/lib/traits.d.ts +11 -0
  155. package/lib/traits.d.ts.map +1 -0
  156. package/lib/traits.js +1 -0
  157. package/package.json +82 -2
  158. package/src/credentials.ts +205 -0
  159. package/src/errors.ts +102 -0
  160. package/src/index.ts +45 -0
  161. package/src/pagination.ts +9 -0
  162. package/src/protocol.ts +94 -0
  163. package/src/retry.ts +50 -0
  164. package/src/services/catalog.ts +6636 -0
  165. package/src/services/cluster.ts +492 -0
  166. package/src/services/column_mask.ts +388 -0
  167. package/src/services/cross_account_iam_role.ts +328 -0
  168. package/src/services/data_domain.ts +509 -0
  169. package/src/services/data_product.ts +641 -0
  170. package/src/services/data_product_usage_example.ts +380 -0
  171. package/src/services/data_quality.ts +771 -0
  172. package/src/services/data_quality_metrics.ts +580 -0
  173. package/src/services/data_quality_schedule.ts +454 -0
  174. package/src/services/discovery.ts +1257 -0
  175. package/src/services/file_ingest_source.ts +480 -0
  176. package/src/services/group.ts +282 -0
  177. package/src/services/index.ts +26 -0
  178. package/src/services/kafka_ingest_source.ts +545 -0
  179. package/src/services/live_table.ts +1537 -0
  180. package/src/services/policy.ts +526 -0
  181. package/src/services/privatelink.ts +209 -0
  182. package/src/services/privilege.ts +423 -0
  183. package/src/services/role.ts +501 -0
  184. package/src/services/row_filter.ts +365 -0
  185. package/src/services/schema_discovery.ts +516 -0
  186. package/src/services/service_account.ts +525 -0
  187. package/src/services/sql_jobs.ts +621 -0
  188. package/src/services/tag.ts +785 -0
  189. package/src/services/user.ts +375 -0
  190. package/src/traits.ts +44 -0
@@ -0,0 +1,1537 @@
1
+ import * as API from "@distilled.cloud/core/api";
2
+ import * as C from "@distilled.cloud/core/category";
3
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-starburst-galaxy/specs/{v1,v2}.json). Do not edit.
4
+ import * as S from "@distilled.cloud/core/schema-lite";
5
+ import * as __L from "@distilled.cloud/core/schema-lite";
6
+ import { StarburstGalaxyServiceErrors } from "../errors.ts";
7
+ import { paginateToken } from "../pagination.ts";
8
+ import {
9
+ StarburstGalaxyProtocol,
10
+ type StarburstGalaxyOpError,
11
+ type StarburstGalaxyOpContext,
12
+ } from "../protocol.ts";
13
+ import * as Retry from "../retry.ts";
14
+ import * as T from "../traits.ts";
15
+ // Schema table, filled on first reach (see __S at the end).
16
+ const __s: any[] = [];
17
+
18
+ export type { StarburstGalaxyOpError, StarburstGalaxyOpContext };
19
+
20
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
21
+ const TELEMETRY = {
22
+ system: "starburst-galaxy-api",
23
+ responseHeaders: [
24
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
25
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
26
+ ],
27
+ prefix: "StarburstGalaxy",
28
+ service: "LiveTableService",
29
+ labels: "starburst_galaxy",
30
+ propagate: "w3c",
31
+ } as const;
32
+
33
+ export class BadRequest
34
+ extends /*@__PURE__*/ T.applyErrorMatchers(
35
+ /*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
36
+ message: S.String,
37
+ body: S.Unknown,
38
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
39
+ }).pipe(C.withBadRequestError),
40
+ [{ status: 400 }],
41
+ ) {}
42
+
43
+ export class Conflict
44
+ extends /*@__PURE__*/ T.applyErrorMatchers(
45
+ /*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
46
+ message: S.String,
47
+ body: S.Unknown,
48
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
49
+ }).pipe(C.withConflictError),
50
+ [{ status: 409 }],
51
+ ) {}
52
+
53
+ export class Forbidden
54
+ extends /*@__PURE__*/ T.applyErrorMatchers(
55
+ /*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
56
+ message: S.String,
57
+ body: S.Unknown,
58
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
59
+ }).pipe(C.withAuthError),
60
+ [{ status: 403 }],
61
+ ) {}
62
+
63
+ export class NotFound
64
+ extends /*@__PURE__*/ T.applyErrorMatchers(
65
+ /*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
66
+ message: S.String,
67
+ body: S.Unknown,
68
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
69
+ }).pipe(C.withBadRequestError),
70
+ [{ status: 404 }],
71
+ ) {}
72
+
73
+ export type FailureMode = "Continue" | "FailFast";
74
+ export type NewTypePropertiesNewKafkaIngestPropertiesTypeKey = "newKafkaIngestProperties";
75
+ export type KafkaStartStrategy = "Earliest" | "Latest";
76
+ export type LatencyMode = "BalancedMode" | "LowLatencyMode";
77
+ /** Properties required for creating a new live table ingesting from Kafka */
78
+ export interface NewTypePropertiesNewKafkaIngestProperties {
79
+ typeKey: NewTypePropertiesNewKafkaIngestPropertiesTypeKey;
80
+ /** ID of the Kafka ingest source obtained from the /kafkaIngestSource endpoint */
81
+ kafkaIngestSourceId: string;
82
+ /** Kafka topic name */
83
+ kafkaTopicName: string;
84
+ /** Stream start strategy */
85
+ startStrategy: KafkaStartStrategy | (string & {});
86
+ /** Throughput limit per partition */
87
+ partitionMaxBytesPerSec: number;
88
+ /** Latency mode for commits */
89
+ latencyMode: LatencyMode | (string & {});
90
+ }
91
+ export type NewTypePropertiesNewFileIngestPropertiesTypeKey = "newFileIngestProperties";
92
+ export type FileFormat = "Json" | "Csv";
93
+ export type CsvDelimiter = "Comma" | "Tab" | "Pipe" | "Semicolon";
94
+ export type CsvQuoteChar = "DoubleQuote" | "SingleQuote";
95
+ export type CsvEscapeChar = "DoubleQuote" | "Backslash";
96
+ /** CSV format parameters. Required for CSV format, must be absent for other formats */
97
+ export interface NewTypePropertiesNewFileIngestPropertiesCsvParameters {
98
+ /** CSV delimiter character */
99
+ delimiter: CsvDelimiter | (string & {});
100
+ /** CSV quote character */
101
+ quoteChar: CsvQuoteChar | (string & {});
102
+ /** CSV escape character */
103
+ escapeChar: CsvEscapeChar | (string & {});
104
+ /** Number of CSV header lines to exclude */
105
+ numHeaderLinesToExclude: number;
106
+ }
107
+ /** Properties required for creating a new live table ingesting from a file */
108
+ export interface NewTypePropertiesNewFileIngestProperties {
109
+ typeKey: NewTypePropertiesNewFileIngestPropertiesTypeKey;
110
+ /** ID of the file ingest source obtained from the /fileIngestSource endpoint */
111
+ fileIngestSourceId: string;
112
+ /** Suffix to append to the name from ingest source */
113
+ pathSuffix?: string | undefined;
114
+ /** File format */
115
+ fileFormat: FileFormat | (string & {});
116
+ /** List files in object storage every polling interval */
117
+ pollingIntervalInMinutes: number;
118
+ /** CSV format parameters. Required for CSV format, must be absent for other formats */
119
+ csvParameters?: NewTypePropertiesNewFileIngestPropertiesCsvParameters | undefined;
120
+ }
121
+ export type NewTypePropertiesNewIngestJsonTransformPropertiesTypeKey =
122
+ "newIngestJsonTransformProperties";
123
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
124
+ export type NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItemFieldParserConfigParseParametersMap =
125
+ { [key: string]: string | undefined };
126
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
127
+ export interface NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItemFieldParserConfig {
128
+ /** JSON pointer (IETF RFC 6901) */
129
+ pointer: string;
130
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
131
+ parseParameters?:
132
+ | NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItemFieldParserConfigParseParametersMap
133
+ | undefined;
134
+ }
135
+ export type TypeId =
136
+ | "Boolean"
137
+ | "Integer"
138
+ | "Bigint"
139
+ | "Real"
140
+ | "Double"
141
+ | "Decimal"
142
+ | "Date"
143
+ | "Time"
144
+ | "Timestamp"
145
+ | "TimestampTz"
146
+ | "Varchar"
147
+ | "Uuid"
148
+ | "Varbinary"
149
+ | "Row"
150
+ | "Array"
151
+ | "Map";
152
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
153
+ export type NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItemTrinoTypeTypeParametersMap =
154
+ { [key: string]: string | undefined };
155
+ /** Column type; adheres to Trino conventions */
156
+ export interface NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItemTrinoType {
157
+ /** Trino type enum */
158
+ typeId: TypeId | (string & {});
159
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
160
+ typeParameters?:
161
+ | NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItemTrinoTypeTypeParametersMap
162
+ | undefined;
163
+ }
164
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
165
+ export type NewJsonIngestColumnFieldParserConfigParseParametersMap = {
166
+ [key: string]: string | undefined;
167
+ };
168
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
169
+ export interface NewJsonIngestColumnFieldParserConfig {
170
+ /** JSON pointer (IETF RFC 6901) */
171
+ pointer: string;
172
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
173
+ parseParameters?: NewJsonIngestColumnFieldParserConfigParseParametersMap | undefined;
174
+ }
175
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
176
+ export type NewJsonIngestColumnTrinoTypeTypeParametersMap = { [key: string]: string | undefined };
177
+ /** Column type; adheres to Trino conventions */
178
+ export interface NewJsonIngestColumnTrinoType {
179
+ /** Trino type enum */
180
+ typeId: TypeId | (string & {});
181
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
182
+ typeParameters?: NewJsonIngestColumnTrinoTypeTypeParametersMap | undefined;
183
+ }
184
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
185
+ export type NewJsonIngestColumnNestedColumnsList = Array<NewJsonIngestColumn>;
186
+ /** Schema of the transformed table */
187
+ export interface NewJsonIngestColumn {
188
+ /** Name of the transform column; adheres to Trino conventions */
189
+ trinoColumnName: string;
190
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
191
+ fieldParserConfig: NewJsonIngestColumnFieldParserConfig;
192
+ /** Column type; adheres to Trino conventions */
193
+ trinoType: NewJsonIngestColumnTrinoType;
194
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
195
+ nestedColumns?: NewJsonIngestColumnNestedColumnsList | undefined;
196
+ }
197
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
198
+ export type NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItemNestedColumnsList =
199
+ Array<NewJsonIngestColumn>;
200
+ /** Schema of the transformed table */
201
+ export interface NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItem {
202
+ /** Name of the transform column; adheres to Trino conventions */
203
+ trinoColumnName: string;
204
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
205
+ fieldParserConfig: NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItemFieldParserConfig;
206
+ /** Column type; adheres to Trino conventions */
207
+ trinoType: NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItemTrinoType;
208
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
209
+ nestedColumns?:
210
+ | NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItemNestedColumnsList
211
+ | undefined;
212
+ }
213
+ /** Schema of the transformed table */
214
+ export type NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaList =
215
+ Array<NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItem>;
216
+ /** Custom partition spec for transform live tables */
217
+ export interface NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem {
218
+ /** Column name from IngestColumn or NewIngestColumn */
219
+ trinoColumnName: string;
220
+ /** One of {identity, year, month, day, hour, bucket, truncate, void} */
221
+ transformType: string;
222
+ /** Bucket count when transformType=bucket */
223
+ bucketCount?: number | undefined;
224
+ /** Width when transformType=truncate */
225
+ truncateWidth?: number | undefined;
226
+ }
227
+ /** Custom partition spec for transform live tables */
228
+ export type NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecList =
229
+ Array<NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem>;
230
+ export type FanoutTransform = "Identity";
231
+ /** Fans the table's output out into one sink table per distinct combination of these column values, instead of a single output table. Order is part of the route's identity, and the columns cannot be changed once the table exists */
232
+ export interface NewTypePropertiesNewIngestJsonTransformPropertiesFanoutColumnsItem {
233
+ /** Name of the column to route on, from IngestColumn or NewIngestColumn */
234
+ trinoColumnName: string;
235
+ /** Transform applied to the column value to form the route */
236
+ transform: FanoutTransform | (string & {});
237
+ }
238
+ /** Fans the table's output out into one sink table per distinct combination of these column values, instead of a single output table. Order is part of the route's identity, and the columns cannot be changed once the table exists */
239
+ export type NewTypePropertiesNewIngestJsonTransformPropertiesFanoutColumnsList =
240
+ Array<NewTypePropertiesNewIngestJsonTransformPropertiesFanoutColumnsItem>;
241
+ /** Properties required for creating a new JSON transform live table */
242
+ export interface NewTypePropertiesNewIngestJsonTransformProperties {
243
+ typeKey: NewTypePropertiesNewIngestJsonTransformPropertiesTypeKey;
244
+ /** ID of the source table */
245
+ liveTableId: string;
246
+ /** Schema of the transformed table */
247
+ userDefinedSchema: NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaList;
248
+ /** Custom partition spec for transform live tables */
249
+ userDefinedPartitionSpec?:
250
+ | NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecList
251
+ | undefined;
252
+ /** Sort column */
253
+ sortColumnName?: string | undefined;
254
+ /** Fans the table's output out into one sink table per distinct combination of these column values, instead of a single output table. Order is part of the route's identity, and the columns cannot be changed once the table exists */
255
+ fanoutColumns?: NewTypePropertiesNewIngestJsonTransformPropertiesFanoutColumnsList | undefined;
256
+ }
257
+ export type NewTypePropertiesNewIngestSchemaRegistryAvroTransformPropertiesTypeKey =
258
+ "newIngestSchemaRegistryAvroTransformProperties";
259
+ /** Custom partition spec for transform live tables */
260
+ export type NewTypePropertiesNewIngestSchemaRegistryAvroTransformPropertiesUserDefinedPartitionSpecItem =
261
+ NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem;
262
+ /** Custom partition spec for transform live tables */
263
+ export type NewTypePropertiesNewIngestSchemaRegistryAvroTransformPropertiesUserDefinedPartitionSpecList =
264
+ Array<NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem>;
265
+ /** Fans the table's output out into one sink table per distinct combination of these column values, instead of a single output table. Order is part of the route's identity, and the columns cannot be changed once the table exists */
266
+ export type NewTypePropertiesNewIngestSchemaRegistryAvroTransformPropertiesFanoutColumnsItem =
267
+ NewTypePropertiesNewIngestJsonTransformPropertiesFanoutColumnsItem;
268
+ /** Fans the table's output out into one sink table per distinct combination of these column values, instead of a single output table. Order is part of the route's identity, and the columns cannot be changed once the table exists */
269
+ export type NewTypePropertiesNewIngestSchemaRegistryAvroTransformPropertiesFanoutColumnsList =
270
+ Array<NewTypePropertiesNewIngestJsonTransformPropertiesFanoutColumnsItem>;
271
+ /** Properties required for creating a new schema registry Avro transform live table */
272
+ export interface NewTypePropertiesNewIngestSchemaRegistryAvroTransformProperties {
273
+ typeKey: NewTypePropertiesNewIngestSchemaRegistryAvroTransformPropertiesTypeKey;
274
+ /** ID of the source table */
275
+ liveTableId: string;
276
+ /** Schema registry ID associated with the live table */
277
+ schemaRegistryId: string;
278
+ /** Subject name in the schema registry */
279
+ subjectName: string;
280
+ /** Custom partition spec for transform live tables */
281
+ userDefinedPartitionSpec?:
282
+ | NewTypePropertiesNewIngestSchemaRegistryAvroTransformPropertiesUserDefinedPartitionSpecList
283
+ | undefined;
284
+ /** Sort column */
285
+ sortColumnName?: string | undefined;
286
+ /** Fans the table's output out into one sink table per distinct combination of these column values, instead of a single output table. Order is part of the route's identity, and the columns cannot be changed once the table exists */
287
+ fanoutColumns?:
288
+ | NewTypePropertiesNewIngestSchemaRegistryAvroTransformPropertiesFanoutColumnsList
289
+ | undefined;
290
+ }
291
+ export type NewTypePropertiesNewFilterAndProjectTransformPropertiesTypeKey =
292
+ "newFilterAndProjectTransformProperties";
293
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
294
+ export type NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemTypeTypeParametersMap =
295
+ { [key: string]: string | undefined };
296
+ /** Column type; adheres to Trino conventions */
297
+ export interface NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemType {
298
+ /** Trino type enum */
299
+ typeId: TypeId | (string & {});
300
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
301
+ typeParameters?:
302
+ | NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemTypeTypeParametersMap
303
+ | undefined;
304
+ }
305
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
306
+ export type NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemNestedColumnsItemTypeTypeParametersMap =
307
+ { [key: string]: string | undefined };
308
+ /** Column type; adheres to Trino conventions */
309
+ export interface NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemNestedColumnsItemType {
310
+ /** Trino type enum */
311
+ typeId: TypeId | (string & {});
312
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
313
+ typeParameters?:
314
+ | NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemNestedColumnsItemTypeTypeParametersMap
315
+ | undefined;
316
+ }
317
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
318
+ export type NewFilterAndProjectTransformNestedColumnTypeTypeParametersMap = {
319
+ [key: string]: string | undefined;
320
+ };
321
+ /** Column type; adheres to Trino conventions */
322
+ export interface NewFilterAndProjectTransformNestedColumnType {
323
+ /** Trino type enum */
324
+ typeId: TypeId | (string & {});
325
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
326
+ typeParameters?: NewFilterAndProjectTransformNestedColumnTypeTypeParametersMap | undefined;
327
+ }
328
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
329
+ export type NewFilterAndProjectTransformNestedColumnNestedColumnsList =
330
+ Array<NewFilterAndProjectTransformNestedColumn>;
331
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
332
+ export interface NewFilterAndProjectTransformNestedColumn {
333
+ /** Name of the nested field; adheres to Trino conventions */
334
+ name: string;
335
+ /** Column type; adheres to Trino conventions */
336
+ type: NewFilterAndProjectTransformNestedColumnType;
337
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
338
+ nestedColumns?: NewFilterAndProjectTransformNestedColumnNestedColumnsList | undefined;
339
+ }
340
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
341
+ export type NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemNestedColumnsItemNestedColumnsList =
342
+ Array<NewFilterAndProjectTransformNestedColumn>;
343
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
344
+ export interface NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemNestedColumnsItem {
345
+ /** Name of the nested field; adheres to Trino conventions */
346
+ name: string;
347
+ /** Column type; adheres to Trino conventions */
348
+ type: NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemNestedColumnsItemType;
349
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
350
+ nestedColumns?:
351
+ | NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemNestedColumnsItemNestedColumnsList
352
+ | undefined;
353
+ }
354
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
355
+ export type NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemNestedColumnsList =
356
+ Array<NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemNestedColumnsItem>;
357
+ /** Output columns of the transform; each carries its name, type, and the Trino SQL scalar expression over the input table's columns that produces its value */
358
+ export interface NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItem {
359
+ /** Name of the output column; adheres to Trino conventions */
360
+ name: string;
361
+ /** Column type; adheres to Trino conventions */
362
+ type: NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemType;
363
+ /** Trino SQL scalar expression over the input table's columns that produces this column's value */
364
+ expression: string;
365
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
366
+ nestedColumns?:
367
+ | NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemNestedColumnsList
368
+ | undefined;
369
+ }
370
+ /** Output columns of the transform; each carries its name, type, and the Trino SQL scalar expression over the input table's columns that produces its value */
371
+ export type NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsList =
372
+ Array<NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItem>;
373
+ /** Trino SQL boolean predicates over the input table's columns that select which rows are emitted; at most one is supported */
374
+ export type NewTypePropertiesNewFilterAndProjectTransformPropertiesFilterExpressionsList =
375
+ Array<string>;
376
+ /** Custom partition spec for transform live tables */
377
+ export type NewTypePropertiesNewFilterAndProjectTransformPropertiesUserDefinedPartitionSpecItem =
378
+ NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem;
379
+ /** Custom partition spec for transform live tables */
380
+ export type NewTypePropertiesNewFilterAndProjectTransformPropertiesUserDefinedPartitionSpecList =
381
+ Array<NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem>;
382
+ /** Properties required for creating a new filter and project transform live table */
383
+ export interface NewTypePropertiesNewFilterAndProjectTransformProperties {
384
+ typeKey: NewTypePropertiesNewFilterAndProjectTransformPropertiesTypeKey;
385
+ /** ID of the source transform table */
386
+ liveTableId: string;
387
+ /** Output columns of the transform; each carries its name, type, and the Trino SQL scalar expression over the input table's columns that produces its value */
388
+ columns: NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsList;
389
+ /** Trino SQL boolean predicates over the input table's columns that select which rows are emitted; at most one is supported */
390
+ filterExpressions: NewTypePropertiesNewFilterAndProjectTransformPropertiesFilterExpressionsList;
391
+ /** Custom partition spec for transform live tables */
392
+ userDefinedPartitionSpec?:
393
+ | NewTypePropertiesNewFilterAndProjectTransformPropertiesUserDefinedPartitionSpecList
394
+ | undefined;
395
+ /** Sort column */
396
+ sortColumnName?: string | undefined;
397
+ }
398
+ /** Type-specific properties for the new live table */
399
+ export type NewTypeProperties =
400
+ | NewTypePropertiesNewKafkaIngestProperties
401
+ | NewTypePropertiesNewFileIngestProperties
402
+ | NewTypePropertiesNewIngestJsonTransformProperties
403
+ | NewTypePropertiesNewIngestSchemaRegistryAvroTransformProperties
404
+ | NewTypePropertiesNewFilterAndProjectTransformProperties;
405
+ export interface CreateLiveTableRequest {
406
+ /** Table description */
407
+ description?: string | undefined;
408
+ /** ID of the table publisher catalog, a Glue or Galaxy metastore catalog. Optional when galaxyRestCatalogId is set */
409
+ catalogId?: string | undefined;
410
+ /** ID of the Galaxy REST metastore catalog serving the table. Optional when catalogId is set. When both are set the catalogs must share the same default bucket and directory, and the table publisher catalog's storage settings apply */
411
+ galaxyRestCatalogId?: string | undefined;
412
+ /** Name of the table's schema */
413
+ schemaName: string;
414
+ /** Table name */
415
+ tableName: string;
416
+ /** If configured, data older than dataRetentionDays is deleted from Iceberg; otherwise, data is kept forever */
417
+ dataRetentionDays?: number | undefined;
418
+ /** Number of days to retain table snapshots; older snapshots are automatically removed during maintenance */
419
+ snapshotRetentionDays?: number | undefined;
420
+ /** Failure mode */
421
+ failureMode: FailureMode | (string & {});
422
+ typeProperties: NewTypeProperties;
423
+ }
424
+ export type LiveTableState = "Stopped" | "Stopping" | "Running";
425
+ export type TypePropertiesKafkaIngestPropertiesTypeKey = "kafkaIngestProperties";
426
+ /** Properties for a live table ingesting from Kafka */
427
+ export interface TypePropertiesKafkaIngestProperties {
428
+ typeKey: TypePropertiesKafkaIngestPropertiesTypeKey;
429
+ /** ID of the Kafka ingest source obtained from the /kafkaIngestSource endpoint */
430
+ kafkaIngestSourceId: string;
431
+ /** Kafka topic name */
432
+ kafkaTopicName: string;
433
+ /** Stream start strategy */
434
+ startStrategy: KafkaStartStrategy;
435
+ /** Throughput limit per partition */
436
+ partitionMaxBytesPerSec: number;
437
+ /** Latency mode for commits */
438
+ latencyMode: LatencyMode;
439
+ }
440
+ export type TypePropertiesFileIngestPropertiesTypeKey = "fileIngestProperties";
441
+ /** CSV format parameters. Required for CSV format, must be absent for other formats */
442
+ export interface TypePropertiesFileIngestPropertiesCsvParameters {
443
+ /** CSV delimiter character */
444
+ delimiter: CsvDelimiter;
445
+ /** CSV quote character */
446
+ quoteChar: CsvQuoteChar;
447
+ /** CSV escape character */
448
+ escapeChar: CsvEscapeChar;
449
+ /** Number of CSV header lines to exclude */
450
+ numHeaderLinesToExclude: number;
451
+ }
452
+ /** Properties for a live table ingesting from a file */
453
+ export interface TypePropertiesFileIngestProperties {
454
+ typeKey: TypePropertiesFileIngestPropertiesTypeKey;
455
+ /** ID of the file ingest source obtained from the /fileIngestSource endpoint */
456
+ fileIngestSourceId: string;
457
+ /** Suffix to append to the name from ingest source */
458
+ pathSuffix?: string | undefined;
459
+ /** File format */
460
+ fileFormat: FileFormat;
461
+ /** List files in object storage every polling interval */
462
+ pollingIntervalInMinutes: number;
463
+ /** CSV format parameters. Required for CSV format, must be absent for other formats */
464
+ csvParameters?: TypePropertiesFileIngestPropertiesCsvParameters | undefined;
465
+ }
466
+ export type TypePropertiesIngestJsonTransformPropertiesTypeKey = "ingestJsonTransformProperties";
467
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
468
+ export type TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItemFieldParserConfigParseParametersMap =
469
+ { [key: string]: string | undefined };
470
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
471
+ export interface TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItemFieldParserConfig {
472
+ /** JSON pointer (IETF RFC 6901) */
473
+ pointer: string;
474
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
475
+ parseParameters?:
476
+ | TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItemFieldParserConfigParseParametersMap
477
+ | undefined;
478
+ }
479
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
480
+ export type TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItemTrinoTypeTypeParametersMap =
481
+ { [key: string]: string | undefined };
482
+ /** Column type; adheres to Trino conventions */
483
+ export interface TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItemTrinoType {
484
+ /** Trino type enum */
485
+ typeId: TypeId;
486
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
487
+ typeParameters?:
488
+ | TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItemTrinoTypeTypeParametersMap
489
+ | undefined;
490
+ }
491
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
492
+ export type IngestColumnFieldParserConfigParseParametersMap = { [key: string]: string | undefined };
493
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
494
+ export interface IngestColumnFieldParserConfig {
495
+ /** JSON pointer (IETF RFC 6901) */
496
+ pointer: string;
497
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
498
+ parseParameters?: IngestColumnFieldParserConfigParseParametersMap | undefined;
499
+ }
500
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
501
+ export type IngestColumnTrinoTypeTypeParametersMap = { [key: string]: string | undefined };
502
+ /** Column type; adheres to Trino conventions */
503
+ export interface IngestColumnTrinoType {
504
+ /** Trino type enum */
505
+ typeId: TypeId;
506
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
507
+ typeParameters?: IngestColumnTrinoTypeTypeParametersMap | undefined;
508
+ }
509
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
510
+ export type IngestColumnNestedColumnsList = Array<IngestColumn>;
511
+ /** Schema of the transformed table */
512
+ export interface IngestColumn {
513
+ /** ID of the transform column */
514
+ columnId: number;
515
+ /** Name of the transform column; adheres to Trino conventions */
516
+ trinoColumnName: string;
517
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
518
+ fieldParserConfig: IngestColumnFieldParserConfig;
519
+ /** Column type; adheres to Trino conventions */
520
+ trinoType: IngestColumnTrinoType;
521
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
522
+ nestedColumns: IngestColumnNestedColumnsList;
523
+ }
524
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
525
+ export type TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItemNestedColumnsList =
526
+ Array<IngestColumn>;
527
+ /** Schema of the transformed table */
528
+ export interface TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItem {
529
+ /** ID of the transform column */
530
+ columnId: number;
531
+ /** Name of the transform column; adheres to Trino conventions */
532
+ trinoColumnName: string;
533
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
534
+ fieldParserConfig: TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItemFieldParserConfig;
535
+ /** Column type; adheres to Trino conventions */
536
+ trinoType: TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItemTrinoType;
537
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
538
+ nestedColumns: TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItemNestedColumnsList;
539
+ }
540
+ /** Schema of the transformed table */
541
+ export type TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaList =
542
+ Array<TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItem>;
543
+ /** Custom partition spec for transform live tables */
544
+ export type TypePropertiesIngestJsonTransformPropertiesUserDefinedPartitionSpecItem =
545
+ NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem;
546
+ /** Custom partition spec for transform live tables */
547
+ export type TypePropertiesIngestJsonTransformPropertiesUserDefinedPartitionSpecList =
548
+ Array<NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem>;
549
+ /** Fans the table's output out into one sink table per distinct combination of these column values, instead of a single output table. Order is part of the route's identity, and the columns cannot be changed once the table exists */
550
+ export interface TypePropertiesIngestJsonTransformPropertiesFanoutColumnsItem {
551
+ /** Name of the column to route on, from IngestColumn or NewIngestColumn */
552
+ trinoColumnName: string;
553
+ /** Transform applied to the column value to form the route */
554
+ transform: FanoutTransform;
555
+ }
556
+ /** Fans the table's output out into one sink table per distinct combination of these column values, instead of a single output table. Order is part of the route's identity, and the columns cannot be changed once the table exists */
557
+ export type TypePropertiesIngestJsonTransformPropertiesFanoutColumnsList =
558
+ Array<TypePropertiesIngestJsonTransformPropertiesFanoutColumnsItem>;
559
+ /** Properties for a JSON transform live table */
560
+ export interface TypePropertiesIngestJsonTransformProperties {
561
+ typeKey: TypePropertiesIngestJsonTransformPropertiesTypeKey;
562
+ /** ID of the source table */
563
+ liveTableId: string;
564
+ /** Schema of the transformed table */
565
+ userDefinedSchema: TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaList;
566
+ /** Custom partition spec for transform live tables */
567
+ userDefinedPartitionSpec?:
568
+ | TypePropertiesIngestJsonTransformPropertiesUserDefinedPartitionSpecList
569
+ | undefined;
570
+ /** Sort column */
571
+ sortColumnName?: string | undefined;
572
+ /** Fans the table's output out into one sink table per distinct combination of these column values, instead of a single output table. Order is part of the route's identity, and the columns cannot be changed once the table exists */
573
+ fanoutColumns?: TypePropertiesIngestJsonTransformPropertiesFanoutColumnsList | undefined;
574
+ }
575
+ export type TypePropertiesIngestSchemaRegistryAvroTransformPropertiesTypeKey =
576
+ "ingestSchemaRegistryAvroTransformProperties";
577
+ /** Custom partition spec for transform live tables */
578
+ export type TypePropertiesIngestSchemaRegistryAvroTransformPropertiesUserDefinedPartitionSpecItem =
579
+ NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem;
580
+ /** Custom partition spec for transform live tables */
581
+ export type TypePropertiesIngestSchemaRegistryAvroTransformPropertiesUserDefinedPartitionSpecList =
582
+ Array<NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem>;
583
+ /** Fans the table's output out into one sink table per distinct combination of these column values, instead of a single output table. Order is part of the route's identity, and the columns cannot be changed once the table exists */
584
+ export type TypePropertiesIngestSchemaRegistryAvroTransformPropertiesFanoutColumnsItem =
585
+ TypePropertiesIngestJsonTransformPropertiesFanoutColumnsItem;
586
+ /** Fans the table's output out into one sink table per distinct combination of these column values, instead of a single output table. Order is part of the route's identity, and the columns cannot be changed once the table exists */
587
+ export type TypePropertiesIngestSchemaRegistryAvroTransformPropertiesFanoutColumnsList =
588
+ Array<TypePropertiesIngestJsonTransformPropertiesFanoutColumnsItem>;
589
+ /** Properties for a schema registry Avro transform live table */
590
+ export interface TypePropertiesIngestSchemaRegistryAvroTransformProperties {
591
+ typeKey: TypePropertiesIngestSchemaRegistryAvroTransformPropertiesTypeKey;
592
+ /** ID of the source table */
593
+ liveTableId: string;
594
+ /** Schema registry id associated with the live table */
595
+ schemaRegistryId: string;
596
+ /** Subject name in the schema registry */
597
+ subjectName: string;
598
+ /** Custom partition spec for transform live tables */
599
+ userDefinedPartitionSpec?:
600
+ | TypePropertiesIngestSchemaRegistryAvroTransformPropertiesUserDefinedPartitionSpecList
601
+ | undefined;
602
+ /** Sort column */
603
+ sortColumnName?: string | undefined;
604
+ /** Fans the table's output out into one sink table per distinct combination of these column values, instead of a single output table. Order is part of the route's identity, and the columns cannot be changed once the table exists */
605
+ fanoutColumns?:
606
+ | TypePropertiesIngestSchemaRegistryAvroTransformPropertiesFanoutColumnsList
607
+ | undefined;
608
+ }
609
+ export type TypePropertiesFilterAndProjectTransformPropertiesTypeKey =
610
+ "filterAndProjectTransformProperties";
611
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
612
+ export type TypePropertiesFilterAndProjectTransformPropertiesColumnsItemTrinoTypeTypeParametersMap =
613
+ { [key: string]: string | undefined };
614
+ /** Column type; adheres to Trino conventions */
615
+ export interface TypePropertiesFilterAndProjectTransformPropertiesColumnsItemTrinoType {
616
+ /** Trino type enum */
617
+ typeId: TypeId;
618
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
619
+ typeParameters?:
620
+ | TypePropertiesFilterAndProjectTransformPropertiesColumnsItemTrinoTypeTypeParametersMap
621
+ | undefined;
622
+ }
623
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
624
+ export type FilterAndProjectTransformColumnTrinoTypeTypeParametersMap = {
625
+ [key: string]: string | undefined;
626
+ };
627
+ /** Column type; adheres to Trino conventions */
628
+ export interface FilterAndProjectTransformColumnTrinoType {
629
+ /** Trino type enum */
630
+ typeId: TypeId;
631
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
632
+ typeParameters?: FilterAndProjectTransformColumnTrinoTypeTypeParametersMap | undefined;
633
+ }
634
+ /** Nested columns for complex types (Row, Map, Array) */
635
+ export type FilterAndProjectTransformColumnNestedColumnsList =
636
+ Array<FilterAndProjectTransformColumn>;
637
+ /** Output columns and the expressions that produce their values */
638
+ export interface FilterAndProjectTransformColumn {
639
+ /** ID of the transform column */
640
+ columnId: number;
641
+ /** Column name */
642
+ trinoColumnName: string;
643
+ /** Column type; adheres to Trino conventions */
644
+ trinoType: FilterAndProjectTransformColumnTrinoType;
645
+ /** Trino SQL expression producing this column's value; present only for top-level columns */
646
+ expression?: string | undefined;
647
+ /** Nested columns for complex types (Row, Map, Array) */
648
+ nestedColumns: FilterAndProjectTransformColumnNestedColumnsList;
649
+ }
650
+ /** Nested columns for complex types (Row, Map, Array) */
651
+ export type TypePropertiesFilterAndProjectTransformPropertiesColumnsItemNestedColumnsList =
652
+ Array<FilterAndProjectTransformColumn>;
653
+ /** Output columns and the expressions that produce their values */
654
+ export interface TypePropertiesFilterAndProjectTransformPropertiesColumnsItem {
655
+ /** ID of the transform column */
656
+ columnId: number;
657
+ /** Column name */
658
+ trinoColumnName: string;
659
+ /** Column type; adheres to Trino conventions */
660
+ trinoType: TypePropertiesFilterAndProjectTransformPropertiesColumnsItemTrinoType;
661
+ /** Trino SQL expression producing this column's value; present only for top-level columns */
662
+ expression?: string | undefined;
663
+ /** Nested columns for complex types (Row, Map, Array) */
664
+ nestedColumns: TypePropertiesFilterAndProjectTransformPropertiesColumnsItemNestedColumnsList;
665
+ }
666
+ /** Output columns and the expressions that produce their values */
667
+ export type TypePropertiesFilterAndProjectTransformPropertiesColumnsList =
668
+ Array<TypePropertiesFilterAndProjectTransformPropertiesColumnsItem>;
669
+ /** Filter predicates over the input table's columns; at most one is supported */
670
+ export type TypePropertiesFilterAndProjectTransformPropertiesFilterExpressionsList = Array<string>;
671
+ /** Custom partition spec for transform live tables */
672
+ export type TypePropertiesFilterAndProjectTransformPropertiesUserDefinedPartitionSpecItem =
673
+ NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem;
674
+ /** Custom partition spec for transform live tables */
675
+ export type TypePropertiesFilterAndProjectTransformPropertiesUserDefinedPartitionSpecList =
676
+ Array<NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem>;
677
+ /** Properties for a filter and project transform live table */
678
+ export interface TypePropertiesFilterAndProjectTransformProperties {
679
+ typeKey: TypePropertiesFilterAndProjectTransformPropertiesTypeKey;
680
+ /** ID of the source transform table */
681
+ liveTableId: string;
682
+ /** Output columns and the expressions that produce their values */
683
+ columns: TypePropertiesFilterAndProjectTransformPropertiesColumnsList;
684
+ /** Filter predicates over the input table's columns; at most one is supported */
685
+ filterExpressions: TypePropertiesFilterAndProjectTransformPropertiesFilterExpressionsList;
686
+ /** Custom partition spec for transform live tables */
687
+ userDefinedPartitionSpec?:
688
+ | TypePropertiesFilterAndProjectTransformPropertiesUserDefinedPartitionSpecList
689
+ | undefined;
690
+ /** Sort column */
691
+ sortColumnName?: string | undefined;
692
+ }
693
+ /** Type-specific live table properties */
694
+ export type TypeProperties =
695
+ | TypePropertiesKafkaIngestProperties
696
+ | TypePropertiesFileIngestProperties
697
+ | TypePropertiesIngestJsonTransformProperties
698
+ | TypePropertiesIngestSchemaRegistryAvroTransformProperties
699
+ | TypePropertiesFilterAndProjectTransformProperties;
700
+ /** A managed live table */
701
+ export interface LiveTable {
702
+ /** Used to ensure consistency for resource updates. A syncToken that is returned from the server is valid until the resource is updated when a new syncToken will be generated. Only the latest version of the object is maintained. (read only) */
703
+ syncToken: string;
704
+ /** Table ID */
705
+ liveTableId: string;
706
+ /** Table description */
707
+ description?: string | undefined;
708
+ /** Region in which the table is stored */
709
+ cloudRegionId: string;
710
+ /** ID of the table publisher catalog, a Glue or Galaxy metastore catalog. Absent when the table is only served by a Galaxy REST metastore catalog */
711
+ catalogId?: string | undefined;
712
+ /** ID of the Galaxy REST metastore catalog serving the table, if any */
713
+ galaxyRestCatalogId?: string | undefined;
714
+ /** Name of the catalog supplying the table's storage location: the table publisher catalog if set, otherwise the Galaxy REST metastore catalog */
715
+ catalogName: string;
716
+ /** Name of the table's schema */
717
+ schemaName: string;
718
+ /** Table name */
719
+ tableName: string;
720
+ /** Table state */
721
+ liveTableState: LiveTableState;
722
+ /** If configured, data older than dataRetentionDays is deleted from Iceberg; otherwise, data is kept forever */
723
+ dataRetentionDays?: number | undefined;
724
+ /** Number of days to retain table snapshots; older snapshots are automatically removed during maintenance */
725
+ snapshotRetentionDays: number;
726
+ /** Failure mode. */
727
+ failureMode: FailureMode;
728
+ /** Number of undismissed error notifications in the last five days */
729
+ errorNotificationCount: number;
730
+ /** Number of undismissed warning notifications in the last five days */
731
+ warnNotificationCount: number;
732
+ /** Type of stop event if table is stopped */
733
+ stopType?: string | undefined;
734
+ /** Message explaining why the table was stopped */
735
+ stopMessage?: string | undefined;
736
+ typeProperties: TypeProperties;
737
+ }
738
+ export interface DeleteLiveTableRequest {
739
+ /** A managed live table */
740
+ liveTableId: string;
741
+ }
742
+ export interface DeleteLiveTableResponse {}
743
+ export interface GetLiveTableRequest {
744
+ /** A managed live table */
745
+ liveTableId: string;
746
+ }
747
+ export interface ListBriefLiveTablesRequest {
748
+ /** Pagination token */
749
+ pageToken?: string | undefined;
750
+ /** Page size or 0 for default (current maximum is 100) */
751
+ pageSize?: number | undefined;
752
+ }
753
+ /** A page of results. */
754
+ export type PaginatedLiveTableResultList = Array<LiveTable>;
755
+ export interface PaginatedLiveTable {
756
+ /** The next page token to use or "" if there are no more pages. */
757
+ nextPageToken?: string | undefined;
758
+ /** A page of results. */
759
+ result: PaginatedLiveTableResultList;
760
+ }
761
+ export interface ListLiveTablesRequest {
762
+ /** Pagination token */
763
+ pageToken?: string | undefined;
764
+ /** Page size or 0 for default (current maximum is 100) */
765
+ pageSize?: number | undefined;
766
+ }
767
+ export type NewSchemaNewJsonSchemaTypeKey = "newJsonSchema";
768
+ export type UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdateTypeKey =
769
+ "newJsonIngestColumnInSchemaUpdate";
770
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
771
+ export type UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdateFieldParserConfigParseParametersMap =
772
+ { [key: string]: string | undefined };
773
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
774
+ export interface UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdateFieldParserConfig {
775
+ /** JSON pointer (IETF RFC 6901) */
776
+ pointer: string;
777
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
778
+ parseParameters?:
779
+ | UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdateFieldParserConfigParseParametersMap
780
+ | undefined;
781
+ }
782
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
783
+ export type UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdateTrinoTypeTypeParametersMap = {
784
+ [key: string]: string | undefined;
785
+ };
786
+ /** Column type; adheres to Trino conventions */
787
+ export interface UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdateTrinoType {
788
+ /** Trino type enum */
789
+ typeId: TypeId | (string & {});
790
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
791
+ typeParameters?:
792
+ | UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdateTrinoTypeTypeParametersMap
793
+ | undefined;
794
+ }
795
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
796
+ export type NewJsonIngestColumnInSchemaUpdateFieldParserConfigParseParametersMap = {
797
+ [key: string]: string | undefined;
798
+ };
799
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
800
+ export interface NewJsonIngestColumnInSchemaUpdateFieldParserConfig {
801
+ /** JSON pointer (IETF RFC 6901) */
802
+ pointer: string;
803
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
804
+ parseParameters?:
805
+ | NewJsonIngestColumnInSchemaUpdateFieldParserConfigParseParametersMap
806
+ | undefined;
807
+ }
808
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
809
+ export type NewJsonIngestColumnInSchemaUpdateTrinoTypeTypeParametersMap = {
810
+ [key: string]: string | undefined;
811
+ };
812
+ /** Column type; adheres to Trino conventions */
813
+ export interface NewJsonIngestColumnInSchemaUpdateTrinoType {
814
+ /** Trino type enum */
815
+ typeId: TypeId | (string & {});
816
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
817
+ typeParameters?: NewJsonIngestColumnInSchemaUpdateTrinoTypeTypeParametersMap | undefined;
818
+ }
819
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
820
+ export type NewJsonIngestColumnInSchemaUpdateNestedColumnsList =
821
+ Array<NewJsonIngestColumnInSchemaUpdate>;
822
+ /** An added column */
823
+ export interface NewJsonIngestColumnInSchemaUpdate {
824
+ /** Name of the transform column; adheres to Trino conventions */
825
+ trinoColumnName: string;
826
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
827
+ fieldParserConfig: NewJsonIngestColumnInSchemaUpdateFieldParserConfig;
828
+ /** Column type; adheres to Trino conventions */
829
+ trinoType: NewJsonIngestColumnInSchemaUpdateTrinoType;
830
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
831
+ nestedColumns: NewJsonIngestColumnInSchemaUpdateNestedColumnsList;
832
+ }
833
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
834
+ export type UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdateNestedColumnsList =
835
+ Array<NewJsonIngestColumnInSchemaUpdate>;
836
+ /** An added column */
837
+ export interface UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdate {
838
+ typeKey: UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdateTypeKey;
839
+ /** Name of the transform column; adheres to Trino conventions */
840
+ trinoColumnName: string;
841
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
842
+ fieldParserConfig: UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdateFieldParserConfig;
843
+ /** Column type; adheres to Trino conventions */
844
+ trinoType: UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdateTrinoType;
845
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
846
+ nestedColumns: UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdateNestedColumnsList;
847
+ }
848
+ export type UpdatedJsonIngestColumnExistingJsonIngestColumnTypeKey = "existingJsonIngestColumn";
849
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
850
+ export type UpdatedJsonIngestColumnExistingJsonIngestColumnFieldParserConfigParseParametersMap = {
851
+ [key: string]: string | undefined;
852
+ };
853
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
854
+ export interface UpdatedJsonIngestColumnExistingJsonIngestColumnFieldParserConfig {
855
+ /** JSON pointer (IETF RFC 6901) */
856
+ pointer: string;
857
+ /** Parameters for parsing Varchar and time types. For Varchar, the only allowed parameter is "varchar.type", with valid values "scalar" or "json". For Timestamp and TimestampTz, the only allowed parameters are: - "timestamp.converter", with valid values "unixtime" or "iso8601". - "timestamp.unit", with valid values "nanos", "micros", "millis", "secs", "mins", "hours", or "days". */
858
+ parseParameters?:
859
+ | UpdatedJsonIngestColumnExistingJsonIngestColumnFieldParserConfigParseParametersMap
860
+ | undefined;
861
+ }
862
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
863
+ export type UpdatedJsonIngestColumnExistingJsonIngestColumnTrinoTypeTypeParametersMap = {
864
+ [key: string]: string | undefined;
865
+ };
866
+ /** Column type; adheres to Trino conventions */
867
+ export interface UpdatedJsonIngestColumnExistingJsonIngestColumnTrinoType {
868
+ /** Trino type enum */
869
+ typeId: TypeId | (string & {});
870
+ /** Parameters for completing the type specification. Types Decimal, Time, Timestamp, and TimestampTz require a parameter named `precision`, which is the number of digits. Type Decimal also requires a parameter named `scale`, which is the number of digits to the right of the decimal point. */
871
+ typeParameters?:
872
+ | UpdatedJsonIngestColumnExistingJsonIngestColumnTrinoTypeTypeParametersMap
873
+ | undefined;
874
+ }
875
+ /** A new set of columns for this table (replaces the old one) */
876
+ export type UpdatedJsonIngestColumn =
877
+ | UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdate
878
+ | UpdatedJsonIngestColumnExistingJsonIngestColumn;
879
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
880
+ export type UpdatedJsonIngestColumnExistingJsonIngestColumnNestedColumnsList =
881
+ Array<UpdatedJsonIngestColumn>;
882
+ /** An existing column; same ID but other properties may differ */
883
+ export interface UpdatedJsonIngestColumnExistingJsonIngestColumn {
884
+ typeKey: UpdatedJsonIngestColumnExistingJsonIngestColumnTypeKey;
885
+ /** ID of the transform column */
886
+ columnId: number;
887
+ /** Name of the transform column; adheres to Trino conventions */
888
+ trinoColumnName: string;
889
+ /** JSON pointer (and parsing parameters) to the raw-table field transformed into this column value */
890
+ fieldParserConfig: UpdatedJsonIngestColumnExistingJsonIngestColumnFieldParserConfig;
891
+ /** Column type; adheres to Trino conventions */
892
+ trinoType: UpdatedJsonIngestColumnExistingJsonIngestColumnTrinoType;
893
+ /** Nested columns for complex types (Row, Map, Array). For primitive types, this list is empty. For the Row type, this contains the fields of the row. For the Map type, this contains the key and value types. For the Array type, this contains the single element type. */
894
+ nestedColumns?: UpdatedJsonIngestColumnExistingJsonIngestColumnNestedColumnsList | undefined;
895
+ }
896
+ /** A new set of columns for this table (replaces the old one) */
897
+ export type NewSchemaNewJsonSchemaColumnsItem =
898
+ | UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdate
899
+ | UpdatedJsonIngestColumnExistingJsonIngestColumn;
900
+ /** A new set of columns for this table (replaces the old one) */
901
+ export type NewSchemaNewJsonSchemaColumnsList = Array<NewSchemaNewJsonSchemaColumnsItem>;
902
+ /** New schema for a JSON transform live table */
903
+ export interface NewSchemaNewJsonSchema {
904
+ typeKey: NewSchemaNewJsonSchemaTypeKey | (string & {});
905
+ /** A new set of columns for this table (replaces the old one) */
906
+ columns: NewSchemaNewJsonSchemaColumnsList;
907
+ /** If present, table storage will be sorted by this */
908
+ sortColumnName?: string | undefined;
909
+ }
910
+ export interface UpdateLiveTableSchemaRequest {
911
+ /** Used to ensure consistency for resource updates. A syncToken that is returned from the server is valid until the resource is updated when a new syncToken will be generated. Only the latest version of the object is maintained. (read only) */
912
+ syncToken: string;
913
+ /** ID of live table whose schema is being updated */
914
+ transformLiveTableSchemaUpdateId: string;
915
+ newSchema: NewSchemaNewJsonSchema;
916
+ }
917
+ /** Any fields/values that are invalid or incorrect */
918
+ export type BadRequestFieldsList = Array<string>;
919
+ /** Invalid request */
920
+ export interface BadRequest2 {
921
+ /** Description of the error */
922
+ message?: string | undefined;
923
+ /** Any fields/values that are invalid or incorrect */
924
+ fields?: BadRequestFieldsList | undefined;
925
+ }
926
+ /** Already exists */
927
+ export interface Exists {
928
+ message?: string | undefined;
929
+ }
930
+ /** Authorization failed */
931
+ export type Forbidden2 = Exists;
932
+ /** Error details (read only) */
933
+ export interface Resourceinfo {
934
+ /** Name of the resource (read only) */
935
+ resourceName: string;
936
+ /** Violation description (read only) */
937
+ description: string;
938
+ }
939
+ /** A specified resource is not found. */
940
+ export interface NotFoundError {
941
+ /** Description of the error */
942
+ message: string;
943
+ detail: Resourceinfo;
944
+ }
945
+ /** Any fields/values that weren't found */
946
+ export type NotFoundFieldsList = Array<string>;
947
+ /** A resource or required component was not found */
948
+ export interface NotFound2 {
949
+ /** Name of the resource */
950
+ message: string;
951
+ /** Violation description */
952
+ description?: string | undefined;
953
+ /** Any fields/values that weren't found */
954
+ fields?: NotFoundFieldsList | undefined;
955
+ }
956
+ export type CreateLiveTableError =
957
+ | BadRequest
958
+ | Forbidden
959
+ | NotFound
960
+ | Conflict
961
+ | StarburstGalaxyOpError;
962
+ /** Creates a new live table **BETA API:** This API is subject to incompatible changes, or even removal, in the future. */
963
+ export const createLiveTable: API.OperationMethod<
964
+ CreateLiveTableRequest,
965
+ LiveTable,
966
+ CreateLiveTableError,
967
+ StarburstGalaxyOpContext
968
+ > = /*@__PURE__*/ API.make(() => ({
969
+ input: __S(15, __c0, 15) as any as S.Schema<CreateLiveTableRequest>,
970
+ output: __S(57, __c1, 25) as any as S.Schema<LiveTable>,
971
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
972
+ serviceErrors: StarburstGalaxyServiceErrors,
973
+ protocol: StarburstGalaxyProtocol,
974
+ retry: Retry.Retry,
975
+ telemetry: TELEMETRY,
976
+ span: "CreateLiveTable",
977
+ }));
978
+
979
+ export type DeleteLiveTableError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
980
+ /** Deletes a live table **BETA API:** This API is subject to incompatible changes, or even removal, in the future. */
981
+ export const deleteLiveTable: API.OperationMethod<
982
+ DeleteLiveTableRequest,
983
+ DeleteLiveTableResponse,
984
+ DeleteLiveTableError,
985
+ StarburstGalaxyOpContext
986
+ > = /*@__PURE__*/ API.make(() => ({
987
+ input: __S(64, __c2, 0) as any as S.Schema<DeleteLiveTableRequest>,
988
+ output: __S(65, __c2, 1) as any as S.Schema<DeleteLiveTableResponse>,
989
+ errors: [BadRequest, Forbidden, NotFound],
990
+ serviceErrors: StarburstGalaxyServiceErrors,
991
+ protocol: StarburstGalaxyProtocol,
992
+ retry: Retry.Retry,
993
+ telemetry: TELEMETRY,
994
+ span: "DeleteLiveTable",
995
+ }));
996
+
997
+ export type GetLiveTableError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
998
+ /** Returns a live table by ID **BETA API:** This API is subject to incompatible changes, or even removal, in the future. */
999
+ export const getLiveTable: API.OperationMethod<
1000
+ GetLiveTableRequest,
1001
+ LiveTable,
1002
+ GetLiveTableError,
1003
+ StarburstGalaxyOpContext
1004
+ > = /*@__PURE__*/ API.make(() => ({
1005
+ input: __S(96, __c3, 0) as any as S.Schema<GetLiveTableRequest>,
1006
+ output: __S(57, __c1, 25) as any as S.Schema<LiveTable>,
1007
+ errors: [BadRequest, Forbidden, NotFound],
1008
+ serviceErrors: StarburstGalaxyServiceErrors,
1009
+ protocol: StarburstGalaxyProtocol,
1010
+ retry: Retry.Retry,
1011
+ telemetry: TELEMETRY,
1012
+ span: "GetLiveTable",
1013
+ }));
1014
+
1015
+ export type ListBriefLiveTablesError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
1016
+ /** Returns all live tables in your account, but in brief form, without all details **BETA API:** This API is subject to incompatible changes, or even removal, in the future. */
1017
+ export const listBriefLiveTables: API.PaginatedOperationMethod<
1018
+ ListBriefLiveTablesRequest,
1019
+ PaginatedLiveTable,
1020
+ ListBriefLiveTablesError,
1021
+ StarburstGalaxyOpContext,
1022
+ LiveTable
1023
+ > = /*@__PURE__*/ API.makePaginated(
1024
+ () => ({
1025
+ input: __S(128, __c4, 0) as any as S.Schema<ListBriefLiveTablesRequest>,
1026
+ output: __S(161, __c5, 1) as any as S.Schema<PaginatedLiveTable>,
1027
+ errors: [BadRequest, Forbidden, NotFound],
1028
+ serviceErrors: StarburstGalaxyServiceErrors,
1029
+ protocol: StarburstGalaxyProtocol,
1030
+ retry: Retry.Retry,
1031
+ telemetry: TELEMETRY,
1032
+ span: "ListBriefLiveTables",
1033
+ pagination: {
1034
+ mode: "token",
1035
+ inputToken: "pageToken",
1036
+ outputToken: "nextPageToken",
1037
+ items: "result",
1038
+ pageSize: "pageSize",
1039
+ } as const,
1040
+ }),
1041
+ paginateToken,
1042
+ ) as any;
1043
+
1044
+ export type ListLiveTablesError = BadRequest | Forbidden | NotFound | StarburstGalaxyOpError;
1045
+ /** Returns all live tables in your account **BETA API:** This API is subject to incompatible changes, or even removal, in the future. */
1046
+ export const listLiveTables: API.PaginatedOperationMethod<
1047
+ ListLiveTablesRequest,
1048
+ PaginatedLiveTable,
1049
+ ListLiveTablesError,
1050
+ StarburstGalaxyOpContext,
1051
+ LiveTable
1052
+ > = /*@__PURE__*/ API.makePaginated(
1053
+ () => ({
1054
+ input: __S(192, __c6, 0) as any as S.Schema<ListLiveTablesRequest>,
1055
+ output: __S(161, __c5, 1) as any as S.Schema<PaginatedLiveTable>,
1056
+ errors: [BadRequest, Forbidden, NotFound],
1057
+ serviceErrors: StarburstGalaxyServiceErrors,
1058
+ protocol: StarburstGalaxyProtocol,
1059
+ retry: Retry.Retry,
1060
+ telemetry: TELEMETRY,
1061
+ span: "ListLiveTables",
1062
+ pagination: {
1063
+ mode: "token",
1064
+ inputToken: "pageToken",
1065
+ outputToken: "nextPageToken",
1066
+ items: "result",
1067
+ pageSize: "pageSize",
1068
+ } as const,
1069
+ }),
1070
+ paginateToken,
1071
+ ) as any;
1072
+
1073
+ export type UpdateLiveTableSchemaError =
1074
+ | BadRequest
1075
+ | Forbidden
1076
+ | NotFound
1077
+ | Conflict
1078
+ | StarburstGalaxyOpError;
1079
+ /** Updates a live table's schema **BETA API:** This API is subject to incompatible changes, or even removal, in the future. */
1080
+ export const updateLiveTableSchema: API.OperationMethod<
1081
+ UpdateLiveTableSchemaRequest,
1082
+ LiveTable,
1083
+ UpdateLiveTableSchemaError,
1084
+ StarburstGalaxyOpContext
1085
+ > = /*@__PURE__*/ API.make(() => ({
1086
+ input: __S(234, __c7, 10) as any as S.Schema<UpdateLiveTableSchemaRequest>,
1087
+ output: __S(57, __c1, 25) as any as S.Schema<LiveTable>,
1088
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
1089
+ serviceErrors: StarburstGalaxyServiceErrors,
1090
+ protocol: StarburstGalaxyProtocol,
1091
+ retry: Retry.Retry,
1092
+ telemetry: TELEMETRY,
1093
+ span: "UpdateLiveTableSchema",
1094
+ }));
1095
+
1096
+ // Schema builders: each runs one schema initializer, on that schema's first use.
1097
+ function __c0(j: number): any {
1098
+ switch (j) {
1099
+ case 0:
1100
+ return S.Array(/*@__PURE__*/ S.suspend(() => __S(1, __c0, 1)));
1101
+ case 1:
1102
+ return S.suspend(() =>
1103
+ S.Struct({
1104
+ trinoColumnName: S.String,
1105
+ fieldParserConfig: __S(36, __c1, 4),
1106
+ trinoType: __S(37, __c1, 5),
1107
+ nestedColumns: S.optional(__S(0, __c0, 0)),
1108
+ }),
1109
+ ).annotate({ identifier: "NewJsonIngestColumn" });
1110
+ case 2:
1111
+ return S.Array(__S(1, __c0, 1));
1112
+ case 3:
1113
+ return S.suspend(() =>
1114
+ S.Struct({
1115
+ trinoColumnName: S.String,
1116
+ fieldParserConfig: __S(36, __c1, 4),
1117
+ trinoType: __S(37, __c1, 5),
1118
+ nestedColumns: S.optional(__S(2, __c0, 2)),
1119
+ }),
1120
+ ).annotate({
1121
+ identifier: "NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItem",
1122
+ });
1123
+ case 4:
1124
+ return S.Array(__S(3, __c0, 3));
1125
+ case 5:
1126
+ return S.suspend(() =>
1127
+ S.Struct({
1128
+ typeKey: S.String,
1129
+ liveTableId: S.String,
1130
+ userDefinedSchema: __S(4, __c0, 4),
1131
+ userDefinedPartitionSpec: S.optional(__S(39, __c1, 7)),
1132
+ sortColumnName: S.optional(S.String),
1133
+ fanoutColumns: S.optional(__S(41, __c1, 9)),
1134
+ }),
1135
+ ).annotate({ identifier: "NewTypePropertiesNewIngestJsonTransformProperties" });
1136
+ case 6:
1137
+ return S.Array(/*@__PURE__*/ S.suspend(() => __S(7, __c0, 7)));
1138
+ case 7:
1139
+ return S.suspend(() =>
1140
+ S.Struct({
1141
+ name: S.String,
1142
+ type: __S(37, __c1, 5),
1143
+ nestedColumns: S.optional(__S(6, __c0, 6)),
1144
+ }),
1145
+ ).annotate({ identifier: "NewFilterAndProjectTransformNestedColumn" });
1146
+ case 8:
1147
+ return S.Array(__S(7, __c0, 7));
1148
+ case 9:
1149
+ return S.suspend(() =>
1150
+ S.Struct({
1151
+ name: S.String,
1152
+ type: __S(37, __c1, 5),
1153
+ nestedColumns: S.optional(__S(8, __c0, 8)),
1154
+ }),
1155
+ ).annotate({
1156
+ identifier:
1157
+ "NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItemNestedColumnsItem",
1158
+ });
1159
+ case 10:
1160
+ return S.Array(__S(9, __c0, 9));
1161
+ case 11:
1162
+ return S.suspend(() =>
1163
+ S.Struct({
1164
+ name: S.String,
1165
+ type: __S(37, __c1, 5),
1166
+ expression: S.String,
1167
+ nestedColumns: S.optional(__S(10, __c0, 10)),
1168
+ }),
1169
+ ).annotate({
1170
+ identifier: "NewTypePropertiesNewFilterAndProjectTransformPropertiesColumnsItem",
1171
+ });
1172
+ case 12:
1173
+ return S.Array(__S(11, __c0, 11));
1174
+ case 13:
1175
+ return S.suspend(() =>
1176
+ S.Struct({
1177
+ typeKey: S.String,
1178
+ liveTableId: S.String,
1179
+ columns: __S(12, __c0, 12),
1180
+ filterExpressions: __S(43, __c1, 11),
1181
+ userDefinedPartitionSpec: S.optional(__S(39, __c1, 7)),
1182
+ sortColumnName: S.optional(S.String),
1183
+ }),
1184
+ ).annotate({ identifier: "NewTypePropertiesNewFilterAndProjectTransformProperties" });
1185
+ case 14:
1186
+ return S.Union([
1187
+ __S(32, __c1, 0),
1188
+ __S(34, __c1, 2),
1189
+ __S(5, __c0, 5),
1190
+ __S(42, __c1, 10),
1191
+ __S(13, __c0, 13),
1192
+ ]);
1193
+ case 15:
1194
+ return S.suspend(() =>
1195
+ S.Struct({
1196
+ description: S.optional(S.String),
1197
+ catalogId: S.optional(S.String),
1198
+ galaxyRestCatalogId: S.optional(S.String),
1199
+ schemaName: S.String,
1200
+ tableName: S.String,
1201
+ dataRetentionDays: S.optional(S.Number),
1202
+ snapshotRetentionDays: S.optional(S.Number),
1203
+ failureMode: S.String,
1204
+ typeProperties: __S(14, __c0, 14),
1205
+ }).pipe(T.Http({ method: "POST", uri: "/public/api/v1/liveTable", code: 200 })),
1206
+ ).annotate({ identifier: "CreateLiveTableRequest" });
1207
+ }
1208
+ }
1209
+ function __c1(j: number): any {
1210
+ switch (j) {
1211
+ case 0:
1212
+ return S.suspend(() =>
1213
+ S.Struct({
1214
+ typeKey: S.String,
1215
+ kafkaIngestSourceId: S.String,
1216
+ kafkaTopicName: S.String,
1217
+ startStrategy: S.String,
1218
+ partitionMaxBytesPerSec: S.Number,
1219
+ latencyMode: S.String,
1220
+ }),
1221
+ ).annotate({ identifier: "NewTypePropertiesNewKafkaIngestProperties" });
1222
+ case 1:
1223
+ return S.suspend(() =>
1224
+ S.Struct({
1225
+ delimiter: S.String,
1226
+ quoteChar: S.String,
1227
+ escapeChar: S.String,
1228
+ numHeaderLinesToExclude: S.Number,
1229
+ }),
1230
+ ).annotate({ identifier: "NewTypePropertiesNewFileIngestPropertiesCsvParameters" });
1231
+ case 2:
1232
+ return S.suspend(() =>
1233
+ S.Struct({
1234
+ typeKey: S.String,
1235
+ fileIngestSourceId: S.String,
1236
+ pathSuffix: S.optional(S.String),
1237
+ fileFormat: S.String,
1238
+ pollingIntervalInMinutes: S.Number,
1239
+ csvParameters: S.optional(__S(33, __c1, 1)),
1240
+ }),
1241
+ ).annotate({ identifier: "NewTypePropertiesNewFileIngestProperties" });
1242
+ case 3:
1243
+ return S.Record(S.String, S.String);
1244
+ case 4:
1245
+ return S.suspend(() =>
1246
+ S.Struct({
1247
+ pointer: S.String,
1248
+ parseParameters: S.optional(__S(35, __c1, 3)),
1249
+ }),
1250
+ ).annotate({
1251
+ identifier:
1252
+ "NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItemFieldParserConfig",
1253
+ });
1254
+ case 5:
1255
+ return S.suspend(() =>
1256
+ S.Struct({
1257
+ typeId: S.String,
1258
+ typeParameters: S.optional(__S(35, __c1, 3)),
1259
+ }),
1260
+ ).annotate({
1261
+ identifier:
1262
+ "NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedSchemaItemTrinoType",
1263
+ });
1264
+ case 6:
1265
+ return S.suspend(() =>
1266
+ S.Struct({
1267
+ trinoColumnName: S.String,
1268
+ transformType: S.String,
1269
+ bucketCount: S.optional(S.Number),
1270
+ truncateWidth: S.optional(S.Number),
1271
+ }),
1272
+ ).annotate({
1273
+ identifier: "NewTypePropertiesNewIngestJsonTransformPropertiesUserDefinedPartitionSpecItem",
1274
+ });
1275
+ case 7:
1276
+ return S.Array(__S(38, __c1, 6));
1277
+ case 8:
1278
+ return S.suspend(() =>
1279
+ S.Struct({
1280
+ trinoColumnName: S.String,
1281
+ transform: S.String,
1282
+ }),
1283
+ ).annotate({
1284
+ identifier: "NewTypePropertiesNewIngestJsonTransformPropertiesFanoutColumnsItem",
1285
+ });
1286
+ case 9:
1287
+ return S.Array(__S(40, __c1, 8));
1288
+ case 10:
1289
+ return S.suspend(() =>
1290
+ S.Struct({
1291
+ typeKey: S.String,
1292
+ liveTableId: S.String,
1293
+ schemaRegistryId: S.String,
1294
+ subjectName: S.String,
1295
+ userDefinedPartitionSpec: S.optional(__S(39, __c1, 7)),
1296
+ sortColumnName: S.optional(S.String),
1297
+ fanoutColumns: S.optional(__S(41, __c1, 9)),
1298
+ }),
1299
+ ).annotate({ identifier: "NewTypePropertiesNewIngestSchemaRegistryAvroTransformProperties" });
1300
+ case 11:
1301
+ return S.Array(S.String);
1302
+ case 12:
1303
+ return S.Array(/*@__PURE__*/ S.suspend(() => __S(45, __c1, 13)));
1304
+ case 13:
1305
+ return S.suspend(() =>
1306
+ S.Struct({
1307
+ columnId: S.Number,
1308
+ trinoColumnName: S.String,
1309
+ fieldParserConfig: __S(36, __c1, 4),
1310
+ trinoType: __S(37, __c1, 5),
1311
+ nestedColumns: __S(44, __c1, 12),
1312
+ }),
1313
+ ).annotate({ identifier: "IngestColumn" });
1314
+ case 14:
1315
+ return S.Array(__S(45, __c1, 13));
1316
+ case 15:
1317
+ return S.suspend(() =>
1318
+ S.Struct({
1319
+ columnId: S.Number,
1320
+ trinoColumnName: S.String,
1321
+ fieldParserConfig: __S(36, __c1, 4),
1322
+ trinoType: __S(37, __c1, 5),
1323
+ nestedColumns: __S(46, __c1, 14),
1324
+ }),
1325
+ ).annotate({
1326
+ identifier: "TypePropertiesIngestJsonTransformPropertiesUserDefinedSchemaItem",
1327
+ });
1328
+ case 16:
1329
+ return S.Array(__S(47, __c1, 15));
1330
+ case 17:
1331
+ return S.suspend(() =>
1332
+ S.Struct({
1333
+ typeKey: S.String,
1334
+ liveTableId: S.String,
1335
+ userDefinedSchema: __S(48, __c1, 16),
1336
+ userDefinedPartitionSpec: S.optional(__S(39, __c1, 7)),
1337
+ sortColumnName: S.optional(S.String),
1338
+ fanoutColumns: S.optional(__S(41, __c1, 9)),
1339
+ }),
1340
+ ).annotate({ identifier: "TypePropertiesIngestJsonTransformProperties" });
1341
+ case 18:
1342
+ return S.Array(/*@__PURE__*/ S.suspend(() => __S(51, __c1, 19)));
1343
+ case 19:
1344
+ return S.suspend(() =>
1345
+ S.Struct({
1346
+ columnId: S.Number,
1347
+ trinoColumnName: S.String,
1348
+ trinoType: __S(37, __c1, 5),
1349
+ expression: S.optional(S.String),
1350
+ nestedColumns: __S(50, __c1, 18),
1351
+ }),
1352
+ ).annotate({ identifier: "FilterAndProjectTransformColumn" });
1353
+ case 20:
1354
+ return S.Array(__S(51, __c1, 19));
1355
+ case 21:
1356
+ return S.suspend(() =>
1357
+ S.Struct({
1358
+ columnId: S.Number,
1359
+ trinoColumnName: S.String,
1360
+ trinoType: __S(37, __c1, 5),
1361
+ expression: S.optional(S.String),
1362
+ nestedColumns: __S(52, __c1, 20),
1363
+ }),
1364
+ ).annotate({ identifier: "TypePropertiesFilterAndProjectTransformPropertiesColumnsItem" });
1365
+ case 22:
1366
+ return S.Array(__S(53, __c1, 21));
1367
+ case 23:
1368
+ return S.suspend(() =>
1369
+ S.Struct({
1370
+ typeKey: S.String,
1371
+ liveTableId: S.String,
1372
+ columns: __S(54, __c1, 22),
1373
+ filterExpressions: __S(43, __c1, 11),
1374
+ userDefinedPartitionSpec: S.optional(__S(39, __c1, 7)),
1375
+ sortColumnName: S.optional(S.String),
1376
+ }),
1377
+ ).annotate({ identifier: "TypePropertiesFilterAndProjectTransformProperties" });
1378
+ case 24:
1379
+ return S.Union([
1380
+ __S(32, __c1, 0),
1381
+ __S(34, __c1, 2),
1382
+ __S(49, __c1, 17),
1383
+ __S(42, __c1, 10),
1384
+ __S(55, __c1, 23),
1385
+ ]);
1386
+ case 25:
1387
+ return S.suspend(() =>
1388
+ S.Struct({
1389
+ syncToken: S.String,
1390
+ liveTableId: S.String,
1391
+ description: S.optional(S.String),
1392
+ cloudRegionId: S.String,
1393
+ catalogId: S.optional(S.String),
1394
+ galaxyRestCatalogId: S.optional(S.String),
1395
+ catalogName: S.String,
1396
+ schemaName: S.String,
1397
+ tableName: S.String,
1398
+ liveTableState: S.String,
1399
+ dataRetentionDays: S.optional(S.Number),
1400
+ snapshotRetentionDays: S.Number,
1401
+ failureMode: S.String,
1402
+ errorNotificationCount: S.Number,
1403
+ warnNotificationCount: S.Number,
1404
+ stopType: S.optional(S.String),
1405
+ stopMessage: S.optional(S.String),
1406
+ typeProperties: __S(56, __c1, 24),
1407
+ }),
1408
+ ).annotate({ identifier: "LiveTable" });
1409
+ }
1410
+ }
1411
+ function __c2(j: number): any {
1412
+ switch (j) {
1413
+ case 0:
1414
+ return S.suspend(() =>
1415
+ S.Struct({
1416
+ liveTableId: S.String.pipe(T.Label()),
1417
+ }).pipe(
1418
+ T.Http({ method: "DELETE", uri: "/public/api/v1/liveTable/{liveTableId}", code: 200 }),
1419
+ ),
1420
+ ).annotate({ identifier: "DeleteLiveTableRequest" });
1421
+ case 1:
1422
+ return S.suspend(() => S.Struct({})).annotate({ identifier: "DeleteLiveTableResponse" });
1423
+ }
1424
+ }
1425
+ function __c3(j: number): any {
1426
+ switch (j) {
1427
+ case 0:
1428
+ return S.suspend(() =>
1429
+ S.Struct({
1430
+ liveTableId: S.String.pipe(T.Label()),
1431
+ }).pipe(
1432
+ T.Http({ method: "GET", uri: "/public/api/v1/liveTable/{liveTableId}", code: 200 }),
1433
+ ),
1434
+ ).annotate({ identifier: "GetLiveTableRequest" });
1435
+ }
1436
+ }
1437
+ function __c4(j: number): any {
1438
+ switch (j) {
1439
+ case 0:
1440
+ return S.suspend(() =>
1441
+ S.Struct({
1442
+ pageToken: S.optional(S.String.pipe(T.Query())),
1443
+ pageSize: S.optional(S.Number.pipe(T.Query())),
1444
+ }).pipe(T.Http({ method: "GET", uri: "/public/api/v1/liveTable:brieflist", code: 200 })),
1445
+ ).annotate({ identifier: "ListBriefLiveTablesRequest" });
1446
+ }
1447
+ }
1448
+ function __c5(j: number): any {
1449
+ switch (j) {
1450
+ case 0:
1451
+ return S.Array(__S(57, __c1, 25));
1452
+ case 1:
1453
+ return S.suspend(() =>
1454
+ S.Struct({
1455
+ nextPageToken: S.optional(S.String),
1456
+ result: __S(160, __c5, 0),
1457
+ }),
1458
+ ).annotate({ identifier: "PaginatedLiveTable" });
1459
+ }
1460
+ }
1461
+ function __c6(j: number): any {
1462
+ switch (j) {
1463
+ case 0:
1464
+ return S.suspend(() =>
1465
+ S.Struct({
1466
+ pageToken: S.optional(S.String.pipe(T.Query())),
1467
+ pageSize: S.optional(S.Number.pipe(T.Query())),
1468
+ }).pipe(T.Http({ method: "GET", uri: "/public/api/v1/liveTable", code: 200 })),
1469
+ ).annotate({ identifier: "ListLiveTablesRequest" });
1470
+ }
1471
+ }
1472
+ function __c7(j: number): any {
1473
+ switch (j) {
1474
+ case 0:
1475
+ return S.Array(/*@__PURE__*/ S.suspend(() => __S(225, __c7, 1)));
1476
+ case 1:
1477
+ return S.suspend(() =>
1478
+ S.Struct({
1479
+ trinoColumnName: S.String,
1480
+ fieldParserConfig: __S(36, __c1, 4),
1481
+ trinoType: __S(37, __c1, 5),
1482
+ nestedColumns: __S(224, __c7, 0),
1483
+ }),
1484
+ ).annotate({ identifier: "NewJsonIngestColumnInSchemaUpdate" });
1485
+ case 2:
1486
+ return S.Array(__S(225, __c7, 1));
1487
+ case 3:
1488
+ return S.suspend(() =>
1489
+ S.Struct({
1490
+ typeKey: S.String,
1491
+ trinoColumnName: S.String,
1492
+ fieldParserConfig: __S(36, __c1, 4),
1493
+ trinoType: __S(37, __c1, 5),
1494
+ nestedColumns: __S(226, __c7, 2),
1495
+ }),
1496
+ ).annotate({ identifier: "UpdatedJsonIngestColumnNewJsonIngestColumnInSchemaUpdate" });
1497
+ case 4:
1498
+ return S.Union([__S(227, __c7, 3), /*@__PURE__*/ S.suspend(() => __S(230, __c7, 6))]);
1499
+ case 5:
1500
+ return S.Array(__S(228, __c7, 4));
1501
+ case 6:
1502
+ return S.suspend(() =>
1503
+ S.Struct({
1504
+ typeKey: S.String,
1505
+ columnId: S.Number,
1506
+ trinoColumnName: S.String,
1507
+ fieldParserConfig: __S(36, __c1, 4),
1508
+ trinoType: __S(37, __c1, 5),
1509
+ nestedColumns: S.optional(__S(229, __c7, 5)),
1510
+ }),
1511
+ ).annotate({ identifier: "UpdatedJsonIngestColumnExistingJsonIngestColumn" });
1512
+ case 7:
1513
+ return S.Union([__S(227, __c7, 3), __S(230, __c7, 6)]);
1514
+ case 8:
1515
+ return S.Array(__S(231, __c7, 7));
1516
+ case 9:
1517
+ return S.suspend(() =>
1518
+ S.Struct({
1519
+ typeKey: S.String,
1520
+ columns: __S(232, __c7, 8),
1521
+ sortColumnName: S.optional(S.String),
1522
+ }),
1523
+ ).annotate({ identifier: "NewSchemaNewJsonSchema" });
1524
+ case 10:
1525
+ return S.suspend(() =>
1526
+ S.Struct({
1527
+ syncToken: S.String,
1528
+ transformLiveTableSchemaUpdateId: S.String,
1529
+ newSchema: __S(233, __c7, 9),
1530
+ }).pipe(T.Http({ method: "PUT", uri: "/public/api/v1/liveTable:schema", code: 200 })),
1531
+ ).annotate({ identifier: "UpdateLiveTableSchemaRequest" });
1532
+ }
1533
+ }
1534
+ // Schema table: entry i is schema j of builder f, made on first reach.
1535
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
1536
+ return (__s[i] ??= __L.at(f, j));
1537
+ }