1#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
4#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5pub struct TableSummary {
6 #[prost(string, tag="1")]
8 pub full_name: ::prost::alloc::string::String,
9 #[prost(enumeration="TableType", tag="2")]
10 pub table_type: i32,
11}
12#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
13#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
14pub struct Column {
15 #[prost(string, tag="1")]
17 pub name: ::prost::alloc::string::String,
18 #[prost(string, tag="2")]
20 pub type_text: ::prost::alloc::string::String,
21 #[prost(string, tag="3")]
23 pub type_json: ::prost::alloc::string::String,
24 #[prost(int32, optional, tag="4")]
26 pub position: ::core::option::Option<i32>,
27 #[prost(enumeration="ColumnTypeName", tag="5")]
29 pub type_name: i32,
30 #[prost(int32, optional, tag="6")]
32 pub type_precision: ::core::option::Option<i32>,
33 #[prost(int32, optional, tag="7")]
35 pub type_scale: ::core::option::Option<i32>,
36 #[prost(string, optional, tag="8")]
38 pub type_interval_type: ::core::option::Option<::prost::alloc::string::String>,
39 #[prost(string, optional, tag="9")]
41 pub comment: ::core::option::Option<::prost::alloc::string::String>,
42 #[prost(bool, optional, tag="10")]
44 pub nullable: ::core::option::Option<bool>,
45 #[prost(int32, optional, tag="11")]
47 pub partition_index: ::core::option::Option<i32>,
48 #[prost(string, optional, tag="12")]
50 pub column_id: ::core::option::Option<::prost::alloc::string::String>,
51}
52#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
54#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
55pub struct TableDependency {
56 #[prost(string, tag="1")]
59 pub table_full_name: ::prost::alloc::string::String,
60}
61#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
63#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
64pub struct FunctionDependency {
65 #[prost(string, tag="1")]
68 pub function_full_name: ::prost::alloc::string::String,
69}
70#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
72#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
73pub struct Dependency {
74 #[prost(oneof="dependency::Dependency", tags="1, 2")]
75 pub dependency: ::core::option::Option<dependency::Dependency>,
76}
77pub mod dependency {
79 #[cfg_attr(feature = "python", ::pyo3::pyclass)]
80 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
81 pub enum Dependency {
82 #[prost(message, tag="1")]
83 Table(super::TableDependency),
84 #[prost(message, tag="2")]
85 Function(super::FunctionDependency),
86 }
87}
88#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
90#[derive(Clone, PartialEq, ::prost::Message)]
91pub struct DependencyList {
92 #[prost(message, repeated, tag="1")]
94 pub dependencies: ::prost::alloc::vec::Vec<Dependency>,
95}
96#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
97#[derive(Clone, PartialEq, ::prost::Message)]
98pub struct Table {
99 #[prost(string, tag="1")]
101 pub name: ::prost::alloc::string::String,
102 #[prost(string, tag="2")]
104 pub catalog_name: ::prost::alloc::string::String,
105 #[prost(string, tag="3")]
107 pub schema_name: ::prost::alloc::string::String,
108 #[prost(enumeration="TableType", tag="4")]
109 pub table_type: i32,
110 #[prost(enumeration="DataSourceFormat", tag="5")]
112 pub data_source_format: i32,
113 #[prost(message, repeated, tag="6")]
115 pub columns: ::prost::alloc::vec::Vec<Column>,
116 #[prost(string, optional, tag="7")]
118 pub storage_location: ::core::option::Option<::prost::alloc::string::String>,
119 #[prost(string, optional, tag="8")]
123 pub view_definition: ::core::option::Option<::prost::alloc::string::String>,
124 #[prost(message, optional, tag="9")]
128 pub view_dependencies: ::core::option::Option<DependencyList>,
129 #[prost(string, optional, tag="11")]
133 pub owner: ::core::option::Option<::prost::alloc::string::String>,
134 #[prost(string, optional, tag="12")]
136 pub comment: ::core::option::Option<::prost::alloc::string::String>,
137 #[prost(map="string, string", tag="13")]
139 pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
140 #[prost(string, optional, tag="14")]
142 pub storage_credential_name: ::core::option::Option<::prost::alloc::string::String>,
143 #[prost(string, tag="17")]
150 pub full_name: ::prost::alloc::string::String,
151 #[prost(int64, optional, tag="18")]
153 pub created_at: ::core::option::Option<i64>,
154 #[prost(string, optional, tag="19")]
156 pub created_by: ::core::option::Option<::prost::alloc::string::String>,
157 #[prost(int64, optional, tag="20")]
159 pub updated_at: ::core::option::Option<i64>,
160 #[prost(string, optional, tag="21")]
162 pub updated_by: ::core::option::Option<::prost::alloc::string::String>,
163 #[prost(int64, optional, tag="22")]
165 pub deleted_at: ::core::option::Option<i64>,
166 #[prost(string, optional, tag="23")]
168 pub table_id: ::core::option::Option<::prost::alloc::string::String>,
169}
170#[cfg_attr(feature = "python", ::pyo3::pyclass)]
172#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
173#[repr(i32)]
174pub enum TableType {
175 Unspecified = 0,
176 Managed = 1,
177 External = 2,
178 View = 3,
179 MaterializedView = 4,
180 StreamingTable = 5,
181 MetricView = 9,
188}
189impl TableType {
190 pub fn as_str_name(&self) -> &'static str {
195 match self {
196 Self::Unspecified => "TABLE_TYPE_UNSPECIFIED",
197 Self::Managed => "MANAGED",
198 Self::External => "EXTERNAL",
199 Self::View => "VIEW",
200 Self::MaterializedView => "MATERIALIZED_VIEW",
201 Self::StreamingTable => "STREAMING_TABLE",
202 Self::MetricView => "METRIC_VIEW",
203 }
204 }
205 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
207 match value {
208 "TABLE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
209 "MANAGED" => Some(Self::Managed),
210 "EXTERNAL" => Some(Self::External),
211 "VIEW" => Some(Self::View),
212 "MATERIALIZED_VIEW" => Some(Self::MaterializedView),
213 "STREAMING_TABLE" => Some(Self::StreamingTable),
214 "METRIC_VIEW" => Some(Self::MetricView),
215 _ => None,
216 }
217 }
218}
219#[cfg_attr(feature = "python", ::pyo3::pyclass)]
220#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
221#[repr(i32)]
222pub enum DataSourceFormat {
223 Unspecified = 0,
224 Delta = 1,
225 Iceberg = 2,
226 Hudi = 3,
227 Parquet = 4,
228 Csv = 5,
229 Json = 6,
230 Orc = 7,
231 Avro = 8,
232 Text = 9,
233 UnityCatalog = 10,
234 Deltasharing = 11,
235}
236impl DataSourceFormat {
237 pub fn as_str_name(&self) -> &'static str {
242 match self {
243 Self::Unspecified => "DATA_SOURCE_FORMAT_UNSPECIFIED",
244 Self::Delta => "DELTA",
245 Self::Iceberg => "ICEBERG",
246 Self::Hudi => "HUDI",
247 Self::Parquet => "PARQUET",
248 Self::Csv => "CSV",
249 Self::Json => "JSON",
250 Self::Orc => "ORC",
251 Self::Avro => "AVRO",
252 Self::Text => "TEXT",
253 Self::UnityCatalog => "UNITY_CATALOG",
254 Self::Deltasharing => "DELTASHARING",
255 }
256 }
257 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
259 match value {
260 "DATA_SOURCE_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
261 "DELTA" => Some(Self::Delta),
262 "ICEBERG" => Some(Self::Iceberg),
263 "HUDI" => Some(Self::Hudi),
264 "PARQUET" => Some(Self::Parquet),
265 "CSV" => Some(Self::Csv),
266 "JSON" => Some(Self::Json),
267 "ORC" => Some(Self::Orc),
268 "AVRO" => Some(Self::Avro),
269 "TEXT" => Some(Self::Text),
270 "UNITY_CATALOG" => Some(Self::UnityCatalog),
271 "DELTASHARING" => Some(Self::Deltasharing),
272 _ => None,
273 }
274 }
275}
276#[cfg_attr(feature = "python", ::pyo3::pyclass)]
277#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
278#[repr(i32)]
279pub enum ColumnTypeName {
280 Unspecified = 0,
281 Boolean = 1,
282 Byte = 2,
283 Short = 3,
284 Int = 4,
285 Long = 5,
286 Float = 6,
287 Double = 7,
288 Date = 8,
289 Timestamp = 9,
290 String = 10,
291 Binary = 11,
292 Decimal = 12,
293 Interval = 13,
294 Array = 14,
295 Struct = 15,
296 Map = 16,
297 Char = 17,
298 Null = 18,
299 UserDefinedType = 19,
300 TimestampNtz = 20,
301 Variant = 21,
302 TableType = 22,
303}
304impl ColumnTypeName {
305 pub fn as_str_name(&self) -> &'static str {
310 match self {
311 Self::Unspecified => "COLUMN_TYPE_NAME_UNSPECIFIED",
312 Self::Boolean => "BOOLEAN",
313 Self::Byte => "BYTE",
314 Self::Short => "SHORT",
315 Self::Int => "INT",
316 Self::Long => "LONG",
317 Self::Float => "FLOAT",
318 Self::Double => "DOUBLE",
319 Self::Date => "DATE",
320 Self::Timestamp => "TIMESTAMP",
321 Self::String => "STRING",
322 Self::Binary => "BINARY",
323 Self::Decimal => "DECIMAL",
324 Self::Interval => "INTERVAL",
325 Self::Array => "ARRAY",
326 Self::Struct => "STRUCT",
327 Self::Map => "MAP",
328 Self::Char => "CHAR",
329 Self::Null => "NULL",
330 Self::UserDefinedType => "USER_DEFINED_TYPE",
331 Self::TimestampNtz => "TIMESTAMP_NTZ",
332 Self::Variant => "VARIANT",
333 Self::TableType => "TABLE_TYPE",
334 }
335 }
336 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
338 match value {
339 "COLUMN_TYPE_NAME_UNSPECIFIED" => Some(Self::Unspecified),
340 "BOOLEAN" => Some(Self::Boolean),
341 "BYTE" => Some(Self::Byte),
342 "SHORT" => Some(Self::Short),
343 "INT" => Some(Self::Int),
344 "LONG" => Some(Self::Long),
345 "FLOAT" => Some(Self::Float),
346 "DOUBLE" => Some(Self::Double),
347 "DATE" => Some(Self::Date),
348 "TIMESTAMP" => Some(Self::Timestamp),
349 "STRING" => Some(Self::String),
350 "BINARY" => Some(Self::Binary),
351 "DECIMAL" => Some(Self::Decimal),
352 "INTERVAL" => Some(Self::Interval),
353 "ARRAY" => Some(Self::Array),
354 "STRUCT" => Some(Self::Struct),
355 "MAP" => Some(Self::Map),
356 "CHAR" => Some(Self::Char),
357 "NULL" => Some(Self::Null),
358 "USER_DEFINED_TYPE" => Some(Self::UserDefinedType),
359 "TIMESTAMP_NTZ" => Some(Self::TimestampNtz),
360 "VARIANT" => Some(Self::Variant),
361 "TABLE_TYPE" => Some(Self::TableType),
362 _ => None,
363 }
364 }
365}
366#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
367#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
368pub struct ListTableSummariesRequest {
369 #[prost(string, tag="1")]
371 pub catalog_name: ::prost::alloc::string::String,
372 #[prost(string, optional, tag="2")]
374 pub schema_name_pattern: ::core::option::Option<::prost::alloc::string::String>,
375 #[prost(string, optional, tag="3")]
377 pub table_name_pattern: ::core::option::Option<::prost::alloc::string::String>,
378 #[prost(int32, optional, tag="100")]
380 pub max_results: ::core::option::Option<i32>,
381 #[prost(string, optional, tag="101")]
383 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
384 #[prost(bool, optional, tag="102")]
386 pub include_manifest_capabilities: ::core::option::Option<bool>,
387}
388#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
389#[derive(Clone, PartialEq, ::prost::Message)]
390pub struct ListTableSummariesResponse {
391 #[prost(message, repeated, tag="1")]
393 pub tables: ::prost::alloc::vec::Vec<TableSummary>,
394 #[prost(string, optional, tag="2")]
396 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
397}
398#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
399#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
400pub struct ListTablesRequest {
401 #[prost(string, tag="1")]
403 pub catalog_name: ::prost::alloc::string::String,
404 #[prost(string, tag="2")]
406 pub schema_name: ::prost::alloc::string::String,
407 #[prost(int32, optional, tag="3")]
409 pub max_results: ::core::option::Option<i32>,
410 #[prost(string, optional, tag="4")]
412 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
413 #[prost(bool, optional, tag="5")]
415 pub include_delta_metadata: ::core::option::Option<bool>,
416 #[prost(bool, optional, tag="6")]
418 pub omit_columns: ::core::option::Option<bool>,
419 #[prost(bool, optional, tag="7")]
421 pub omit_properties: ::core::option::Option<bool>,
422 #[prost(bool, optional, tag="8")]
424 pub omit_username: ::core::option::Option<bool>,
425 #[prost(bool, optional, tag="9")]
427 pub include_browse: ::core::option::Option<bool>,
428 #[prost(bool, optional, tag="10")]
430 pub include_manifest_capabilities: ::core::option::Option<bool>,
431}
432#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
433#[derive(Clone, PartialEq, ::prost::Message)]
434pub struct ListTablesResponse {
435 #[prost(message, repeated, tag="1")]
437 pub tables: ::prost::alloc::vec::Vec<Table>,
438 #[prost(string, optional, tag="2")]
440 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
441}
442#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
446#[derive(Clone, PartialEq, ::prost::Message)]
447pub struct CreateTableRequest {
448 #[prost(string, tag="1")]
450 pub name: ::prost::alloc::string::String,
451 #[prost(string, tag="2")]
453 pub schema_name: ::prost::alloc::string::String,
454 #[prost(string, tag="3")]
456 pub catalog_name: ::prost::alloc::string::String,
457 #[prost(enumeration="TableType", tag="4")]
458 pub table_type: i32,
459 #[prost(enumeration="DataSourceFormat", tag="5")]
460 pub data_source_format: i32,
461 #[prost(message, repeated, tag="6")]
463 pub columns: ::prost::alloc::vec::Vec<Column>,
464 #[prost(string, optional, tag="7")]
466 pub storage_location: ::core::option::Option<::prost::alloc::string::String>,
467 #[prost(string, optional, tag="8")]
469 pub comment: ::core::option::Option<::prost::alloc::string::String>,
470 #[prost(map="string, string", tag="9")]
472 pub properties: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
473 #[prost(string, optional, tag="10")]
477 pub view_definition: ::core::option::Option<::prost::alloc::string::String>,
478 #[prost(message, optional, tag="11")]
482 pub view_dependencies: ::core::option::Option<DependencyList>,
483}
484#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
486#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
487pub struct GetTableRequest {
488 #[prost(string, tag="1")]
490 pub full_name: ::prost::alloc::string::String,
491 #[prost(bool, optional, tag="2")]
493 pub include_delta_metadata: ::core::option::Option<bool>,
494 #[prost(bool, optional, tag="3")]
496 pub include_browse: ::core::option::Option<bool>,
497 #[prost(bool, optional, tag="4")]
499 pub include_manifest_capabilities: ::core::option::Option<bool>,
500}
501#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
503#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
504pub struct GetTableExistsRequest {
505 #[prost(string, tag="1")]
507 pub full_name: ::prost::alloc::string::String,
508}
509#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
510#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
511pub struct GetTableExistsResponse {
512 #[prost(bool, tag="1")]
514 pub table_exists: bool,
515}
516#[cfg_attr(feature = "python", ::pyo3::pyclass(get_all, set_all))]
518#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
519pub struct DeleteTableRequest {
520 #[prost(string, tag="1")]
522 pub full_name: ::prost::alloc::string::String,
523}
524include!("unitycatalog.tables.v1.serde.rs");
525