4
4
5
5
from nisystemlink .clients import core
6
6
from nisystemlink .clients .core ._uplink ._base_client import BaseClient
7
- from nisystemlink .clients .core ._uplink ._methods import delete , get , patch , post
7
+ from nisystemlink .clients .core ._uplink ._methods import (
8
+ delete ,
9
+ get ,
10
+ patch ,
11
+ post ,
12
+ response_handler ,
13
+ )
14
+ from nisystemlink .clients .core .helpers import IteratorFileLike
15
+ from requests .models import Response
8
16
from uplink import Body , Field , Path , Query
9
17
10
18
from . import models
@@ -21,7 +29,7 @@ def __init__(self, configuration: Optional[core.HttpConfiguration] = None):
21
29
is used.
22
30
23
31
Raises:
24
- ApiException: if unable to communicate with the Data Frame service .
32
+ ApiException: if unable to communicate with the DataFrame Service .
25
33
"""
26
34
if configuration is None :
27
35
configuration = core .JupyterHttpConfiguration ()
@@ -36,7 +44,7 @@ def api_info(self) -> models.ApiInfo:
36
44
Information about available API operations.
37
45
38
46
Raises:
39
- ApiException: if unable to communicate with the Data Frame service .
47
+ ApiException: if unable to communicate with the DataFrame Service .
40
48
"""
41
49
...
42
50
@@ -74,7 +82,7 @@ def list_tables(
74
82
The list of tables with a continuation token.
75
83
76
84
Raises:
77
- ApiException: if unable to communicate with the Data Frame service
85
+ ApiException: if unable to communicate with the DataFrame Service
78
86
or provided an invalid argument.
79
87
"""
80
88
...
@@ -90,7 +98,7 @@ def create_table(self, table: models.CreateTableRequest) -> str:
90
98
The ID of the newly created table.
91
99
92
100
Raises:
93
- ApiException: if unable to communicate with the Data Frame service
101
+ ApiException: if unable to communicate with the DataFrame Service
94
102
or provided an invalid argument.
95
103
"""
96
104
...
@@ -106,7 +114,7 @@ def query_tables(self, query: models.QueryTablesRequest) -> models.PagedTables:
106
114
The list of tables with a continuation token.
107
115
108
116
Raises:
109
- ApiException: if unable to communicate with the Data Frame service
117
+ ApiException: if unable to communicate with the DataFrame Service
110
118
or provided an invalid argument.
111
119
"""
112
120
...
@@ -116,13 +124,13 @@ def get_table_metadata(self, id: str) -> models.TableMetadata:
116
124
"""Retrieves the metadata and column information for a single table identified by its ID.
117
125
118
126
Args:
119
- id (str): Unique ID of a DataFrame table.
127
+ id (str): Unique ID of a data table.
120
128
121
129
Returns:
122
130
The metadata for the table.
123
131
124
132
Raises:
125
- ApiException: if unable to communicate with the Data Frame service
133
+ ApiException: if unable to communicate with the DataFrame Service
126
134
or provided an invalid argument.
127
135
"""
128
136
...
@@ -132,11 +140,11 @@ def modify_table(self, id: str, update: models.ModifyTableRequest) -> None:
132
140
"""Modify properties of a table or its columns.
133
141
134
142
Args:
135
- id: Unique ID of a DataFrame table.
143
+ id: Unique ID of a data table.
136
144
update: The metadata to update.
137
145
138
146
Raises:
139
- ApiException: if unable to communicate with the Data Frame service
147
+ ApiException: if unable to communicate with the DataFrame Service
140
148
or provided an invalid argument.
141
149
"""
142
150
...
@@ -146,10 +154,10 @@ def delete_table(self, id: str) -> None:
146
154
"""Deletes a table.
147
155
148
156
Args:
149
- id (str): Unique ID of a DataFrame table.
157
+ id (str): Unique ID of a data table.
150
158
151
159
Raises:
152
- ApiException: if unable to communicate with the Data Frame service
160
+ ApiException: if unable to communicate with the DataFrame Service
153
161
or provided an invalid argument.
154
162
"""
155
163
...
@@ -161,14 +169,14 @@ def delete_tables(
161
169
"""Deletes multiple tables.
162
170
163
171
Args:
164
- ids (List[str]): List of unique IDs of DataFrame tables.
172
+ ids (List[str]): List of unique IDs of data tables.
165
173
166
174
Returns:
167
175
A partial success if any tables failed to delete, or None if all
168
176
tables were deleted successfully.
169
177
170
178
Raises:
171
- ApiException: if unable to communicate with the Data Frame service
179
+ ApiException: if unable to communicate with the DataFrame Service
172
180
or provided an invalid argument.
173
181
"""
174
182
...
@@ -187,7 +195,7 @@ def modify_tables(
187
195
tables were modified successfully.
188
196
189
197
Raises:
190
- ApiException: if unable to communicate with the Data Frame service
198
+ ApiException: if unable to communicate with the DataFrame Service
191
199
or provided an invalid argument.
192
200
"""
193
201
...
@@ -215,7 +223,7 @@ def get_table_data(
215
223
"""Reads raw data from the table identified by its ID.
216
224
217
225
Args:
218
- id: Unique ID of a DataFrame table.
226
+ id: Unique ID of a data table.
219
227
columns: Columns to include in the response. Data will be returned in the same order as
220
228
the columns. If not specified, all columns are returned.
221
229
order_by: List of columns to sort by. Multiple columns may be specified to order rows
@@ -230,7 +238,7 @@ def get_table_data(
230
238
The table data and total number of rows with a continuation token.
231
239
232
240
Raises:
233
- ApiException: if unable to communicate with the Data Frame service
241
+ ApiException: if unable to communicate with the DataFrame Service
234
242
or provided an invalid argument.
235
243
"""
236
244
...
@@ -240,11 +248,11 @@ def append_table_data(self, id: str, data: models.AppendTableDataRequest) -> Non
240
248
"""Appends one or more rows of data to the table identified by its ID.
241
249
242
250
Args:
243
- id: Unique ID of a DataFrame table.
251
+ id: Unique ID of a data table.
244
252
data: The rows of data to append and any additional options.
245
253
246
254
Raises:
247
- ApiException: if unable to communicate with the Data Frame service
255
+ ApiException: if unable to communicate with the DataFrame Service
248
256
or provided an invalid argument.
249
257
"""
250
258
...
@@ -256,14 +264,14 @@ def query_table_data(
256
264
"""Reads rows of data that match a filter from the table identified by its ID.
257
265
258
266
Args:
259
- id: Unique ID of a DataFrame table.
267
+ id: Unique ID of a data table.
260
268
query: The filtering and sorting to apply when reading data.
261
269
262
270
Returns:
263
271
The table data and total number of rows with a continuation token.
264
272
265
273
Raises:
266
- ApiException: if unable to communicate with the Data Frame service
274
+ ApiException: if unable to communicate with the DataFrame Service
267
275
or provided an invalid argument.
268
276
"""
269
277
...
@@ -275,14 +283,37 @@ def query_decimated_data(
275
283
"""Reads decimated rows of data from the table identified by its ID.
276
284
277
285
Args:
278
- id: Unique ID of a DataFrame table.
286
+ id: Unique ID of a data table.
279
287
query: The filtering and decimation options to apply when reading data.
280
288
281
289
Returns:
282
290
The decimated table data.
283
291
284
292
Raises:
285
- ApiException: if unable to communicate with the Data Frame service
293
+ ApiException: if unable to communicate with the DataFrame Service
294
+ or provided an invalid argument.
295
+ """
296
+ ...
297
+
298
+ def _iter_content_filelike_wrapper (response : Response ) -> IteratorFileLike :
299
+ return IteratorFileLike (response .iter_content (chunk_size = 4096 ))
300
+
301
+ @response_handler (_iter_content_filelike_wrapper )
302
+ @post ("tables/{id}/export-data" , args = [Path , Body ])
303
+ def export_table_data (
304
+ self , id : str , query : models .ExportTableDataRequest
305
+ ) -> IteratorFileLike :
306
+ """Exports rows of data that match a filter from the table identified by its ID.
307
+
308
+ Args:
309
+ id: Unique ID of a data table.
310
+ query: The filtering, sorting, and export format to apply when exporting data.
311
+
312
+ Returns:
313
+ A file-like object for reading the exported data.
314
+
315
+ Raises:
316
+ ApiException: if unable to communicate with the DataFrame Service
286
317
or provided an invalid argument.
287
318
"""
288
319
...
0 commit comments