You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Lance Glue namespace implementation accepts the following configuration properties:
15
16
16
-
The **catalog_id** property is optional and specifies the Catalog ID of the Glue catalog (defaults to AWS account ID).
17
+
The **catalog_id** property is optional and specifies the Catalog ID of the Glue catalog to use as the starting point. When not specified, it is resolved to the caller's AWS account ID.
17
18
18
19
The **endpoint** property is optional and specifies a custom Glue service endpoint for API compatible metastores.
19
20
20
-
The **region** property is optional and specifies the AWS region for all Glue operations.
21
+
The **region** property is optional and specifies the AWS region for all Glue operations. When not specified, it is resolved to the default AWS region in the caller's environment.
21
22
22
23
The **access_key_id** property is optional and specifies the AWS access key ID for static credentials.
AWS Glue Data Catalog supports a recursive catalog structure through the [GetCatalog](https://docs.aws.amazon.com/glue/latest/webapi/API_GetCatalog.html) and [GetCatalogs](https://docs.aws.amazon.com/glue/latest/webapi/API_GetCatalogs.html) APIs.
52
53
This allows for multi-level namespace hierarchies.
53
54
54
-
The **root namespace** is represented by the default AWS Glue Data Catalog, which has a catalog ID of `None` or equal to the caller's AWS account ID.
55
+
The **root namespace** is represented by the default AWS Glue Data Catalog. When the `catalog_id` property is not specified or set to `None`, it is resolved to the caller's AWS account ID. Users can specify a different `catalog_id` to use another AWS account's Glue catalog as the starting point.
55
56
56
57
A **child catalog** within the root catalog forms a child namespace. The [GetCatalogs](https://docs.aws.amazon.com/glue/latest/webapi/API_GetCatalogs.html) API supports `ParentCatalogId` parameter to traverse the catalog hierarchy.
This document describes how the Hive 2.x MetaStore implements the Lance Namespace client spec.
4
4
@@ -14,8 +14,6 @@ The **client.pool-size** property is optional and specifies the size of the HMS
14
14
15
15
The **root** property is optional and specifies the storage root location of the lakehouse on Hive catalog. Default value is the current working directory.
16
16
17
-
The **storage.*** prefix properties are optional and specify additional storage configurations to access tables (e.g., `storage.region=us-west-2`).
18
-
19
17
## Object Mapping
20
18
21
19
### Namespace
@@ -56,7 +54,9 @@ The implementation:
56
54
57
55
**Error Handling:**
58
56
59
-
If the namespace already exists and mode is CREATE, return error code `2` (NamespaceAlreadyExists). If the HMS connection fails, return error code `17` (ServiceUnavailable).
57
+
If the namespace already exists and mode is CREATE, return error code `2` (NamespaceAlreadyExists).
58
+
59
+
If the HMS connection fails, return error code `17` (ServiceUnavailable).
60
60
61
61
### ListNamespaces
62
62
@@ -83,7 +83,9 @@ The implementation:
83
83
84
84
**Error Handling:**
85
85
86
-
If the namespace does not exist, return error code `1` (NamespaceNotFound). If the HMS connection fails, return error code `17` (ServiceUnavailable).
86
+
If the namespace does not exist, return error code `1` (NamespaceNotFound).
87
+
88
+
If the HMS connection fails, return error code `17` (ServiceUnavailable).
87
89
88
90
### DropNamespace
89
91
@@ -113,13 +115,17 @@ The implementation:
113
115
1. Parse the table identifier to extract database and table name
114
116
2. Verify the parent namespace exists
115
117
3. Create an HMS Table object with `tableType=EXTERNAL_TABLE`
116
-
4. Set the storage descriptor with the specified or default location
118
+
4. Set the storage descriptor with the specified or default location. When location is not specified, it defaults to `{root}/{database}.db/{table}`
117
119
5. Add `table_type=lance` to the table parameters
118
120
6. Register the table in HMS
119
121
120
122
**Error Handling:**
121
123
122
-
If the parent namespace does not exist, return error code `1` (NamespaceNotFound). If the table already exists, return error code `5` (TableAlreadyExists). If the HMS connection fails, return error code `17` (ServiceUnavailable).
124
+
If the parent namespace does not exist, return error code `1` (NamespaceNotFound).
125
+
126
+
If the table already exists, return error code `5` (TableAlreadyExists).
127
+
128
+
If the HMS connection fails, return error code `17` (ServiceUnavailable).
123
129
124
130
### ListTables
125
131
@@ -135,18 +141,20 @@ The implementation:
135
141
136
142
**Error Handling:**
137
143
138
-
If the namespace does not exist, return error code `1` (NamespaceNotFound). If the HMS connection fails, return error code `17` (ServiceUnavailable).
144
+
If the namespace does not exist, return error code `1` (NamespaceNotFound).
145
+
146
+
If the HMS connection fails, return error code `17` (ServiceUnavailable).
139
147
140
148
### DescribeTable
141
149
142
-
Retrieves metadata for a Lance table. Only `load_detailed_metadata=false` is supported. When `load_detailed_metadata=false`, only the table location and storage_options are returned; other fields (version, table_uri, schema, stats) are null.
150
+
Retrieves metadata for a Lance table. Only `load_detailed_metadata=false` is supported. When `load_detailed_metadata=false`, only the table location is returned; other fields (version, table_uri, schema, stats) are null.
143
151
144
152
The implementation:
145
153
146
154
1. Parse the table identifier
147
155
2. Retrieve the Table object from HMS
148
156
3. Validate that it is a Lance table (check `table_type=lance`)
149
-
4. Return the table location from `storageDescriptor.location` and storage_options from `parameters`
157
+
4. Return the table location from `storageDescriptor.location`
150
158
151
159
**Error Handling:**
152
160
@@ -168,4 +176,8 @@ The implementation:
168
176
169
177
**Error Handling:**
170
178
171
-
If the table does not exist, return error code `4` (TableNotFound). If the table is not a Lance table, return error code `13` (InvalidInput). If the HMS connection fails, return error code `17` (ServiceUnavailable).
179
+
If the table does not exist, return error code `4` (TableNotFound).
180
+
181
+
If the table is not a Lance table, return error code `13` (InvalidInput).
182
+
183
+
If the HMS connection fails, return error code `17` (ServiceUnavailable).
The Lance Hive 3.x namespace implementation accepts the following configuration properties:
11
+
The Lance Hive 3+.x namespace implementation accepts the following configuration properties:
12
12
13
13
The **client.pool-size** property is optional and specifies the size of the HMS client connection pool. Default value is `3`.
14
14
15
15
The **root** property is optional and specifies the storage root location of the lakehouse on Hive catalog. Default value is the current working directory.
16
16
17
-
The **storage.*** prefix properties are optional and specify additional storage configurations to access tables (e.g., `storage.region=us-west-2`).
18
-
19
17
## Object Mapping
20
18
21
19
### Namespace
@@ -57,7 +55,11 @@ The implementation:
57
55
58
56
**Error Handling:**
59
57
60
-
If the namespace already exists and mode is CREATE, return error code `2` (NamespaceAlreadyExists). If the parent catalog does not exist when creating a database, return error code `1` (NamespaceNotFound). If the HMS connection fails, return error code `17` (ServiceUnavailable).
58
+
If the namespace already exists and mode is CREATE, return error code `2` (NamespaceAlreadyExists).
59
+
60
+
If the parent catalog does not exist when creating a database, return error code `1` (NamespaceNotFound).
61
+
62
+
If the HMS connection fails, return error code `17` (ServiceUnavailable).
61
63
62
64
### ListNamespaces
63
65
@@ -72,7 +74,9 @@ The implementation:
72
74
73
75
**Error Handling:**
74
76
75
-
If the parent namespace does not exist, return error code `1` (NamespaceNotFound). If the HMS connection fails, return error code `17` (ServiceUnavailable).
77
+
If the parent namespace does not exist, return error code `1` (NamespaceNotFound).
78
+
79
+
If the HMS connection fails, return error code `17` (ServiceUnavailable).
76
80
77
81
### DescribeNamespace
78
82
@@ -86,7 +90,9 @@ The implementation:
86
90
87
91
**Error Handling:**
88
92
89
-
If the namespace does not exist, return error code `1` (NamespaceNotFound). If the HMS connection fails, return error code `17` (ServiceUnavailable).
93
+
If the namespace does not exist, return error code `1` (NamespaceNotFound).
94
+
95
+
If the HMS connection fails, return error code `17` (ServiceUnavailable).
90
96
91
97
### DropNamespace
92
98
@@ -116,13 +122,17 @@ The implementation:
116
122
1. Parse the table identifier to extract catalog, database, and table name
117
123
2. Verify the parent namespace exists
118
124
3. Create an HMS Table object with `tableType=EXTERNAL_TABLE`
119
-
4. Set the storage descriptor with the specified or default location
125
+
4. Set the storage descriptor with the specified or default location. When location is not specified, it defaults to `{root}/{database}.db/{table}` for the default `hive` catalog (hive2-compatible), or `{root}/{catalog}/{database}.db/{table}` for other catalogs
120
126
5. Add `table_type=lance` to the table parameters
121
127
6. Register the table in HMS
122
128
123
129
**Error Handling:**
124
130
125
-
If the parent namespace does not exist, return error code `1` (NamespaceNotFound). If the table already exists, return error code `5` (TableAlreadyExists). If the HMS connection fails, return error code `17` (ServiceUnavailable).
131
+
If the parent namespace does not exist, return error code `1` (NamespaceNotFound).
132
+
133
+
If the table already exists, return error code `5` (TableAlreadyExists).
134
+
135
+
If the HMS connection fails, return error code `17` (ServiceUnavailable).
126
136
127
137
### ListTables
128
138
@@ -138,18 +148,20 @@ The implementation:
138
148
139
149
**Error Handling:**
140
150
141
-
If the namespace does not exist, return error code `1` (NamespaceNotFound). If the HMS connection fails, return error code `17` (ServiceUnavailable).
151
+
If the namespace does not exist, return error code `1` (NamespaceNotFound).
152
+
153
+
If the HMS connection fails, return error code `17` (ServiceUnavailable).
142
154
143
155
### DescribeTable
144
156
145
-
Retrieves metadata for a Lance table. Only `load_detailed_metadata=false` is supported. When `load_detailed_metadata=false`, only the table location and storage_options are returned; other fields (version, table_uri, schema, stats) are null.
157
+
Retrieves metadata for a Lance table. Only `load_detailed_metadata=false` is supported. When `load_detailed_metadata=false`, only the table location is returned; other fields (version, table_uri, schema, stats) are null.
146
158
147
159
The implementation:
148
160
149
161
1. Parse the table identifier
150
162
2. Retrieve the Table object from HMS
151
163
3. Validate that it is a Lance table (check `table_type=lance`)
152
-
4. Return the table location from `storageDescriptor.location` and storage_options from `parameters`
164
+
4. Return the table location from `storageDescriptor.location`
153
165
154
166
**Error Handling:**
155
167
@@ -171,4 +183,8 @@ The implementation:
171
183
172
184
**Error Handling:**
173
185
174
-
If the table does not exist, return error code `4` (TableNotFound). If the table is not a Lance table, return error code `13` (InvalidInput). If the HMS connection fails, return error code `17` (ServiceUnavailable).
186
+
If the table does not exist, return error code `4` (TableNotFound).
187
+
188
+
If the table is not a Lance table, return error code `13` (InvalidInput).
189
+
190
+
If the HMS connection fails, return error code `17` (ServiceUnavailable).
0 commit comments