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
"""Consolidates TileDB array fragments for improved read performance
205
+
206
+
:param str uri: URI to the TileDB Array
207
+
:param str key: (default None) Key to decrypt array if the array is encrypted
208
+
:param tiledb.Config config: The TileDB Config with consolidation parameters set
209
+
:param tiledb.Ctx ctx: (default None) The TileDB Context
210
+
:param fragment_uris: (default None) Consolidate the array using a list of fragment file names
211
+
:param timestamp: (default None) If not None, consolidate the array using the given tuple(int, int) UNIX seconds range (inclusive). This argument will be ignored if `fragment_uris` is passed.
212
+
:rtype: str or bytes
213
+
:return: path (URI) to the consolidated TileDB Array
214
+
:raises TypeError: cannot convert path to unicode string
215
+
:raises: :py:exc:`tiledb.TileDBError`
216
+
217
+
Rather than passing the timestamp into this function, it may be set with
218
+
the config parameters `"sm.vacuum.timestamp_start"`and
219
+
`"sm.vacuum.timestamp_end"` which takes in a time in UNIX seconds. If both
220
+
are set then this function's `timestamp` argument will be used.
221
+
222
+
**Example:**
223
+
224
+
>>> import tiledb, tempfile, numpy as np, os
225
+
>>> path = tempfile.mkdtemp()
226
+
227
+
>>> with tiledb.from_numpy(path, np.zeros(4), timestamp=1) as A:
228
+
... pass
229
+
>>> with tiledb.open(path, 'w', timestamp=2) as A:
230
+
... A[:] = np.ones(4, dtype=np.int64)
231
+
>>> with tiledb.open(path, 'w', timestamp=3) as A:
232
+
... A[:] = np.ones(4, dtype=np.int64)
233
+
>>> with tiledb.open(path, 'w', timestamp=4) as A:
234
+
... A[:] = np.ones(4, dtype=np.int64)
235
+
>>> len(tiledb.array_fragments(path))
236
+
4
237
+
238
+
>>> fragment_names = [
239
+
... os.path.basename(f) for f in tiledb.array_fragments(path).uri
0 commit comments