nominal 1.98.0__py3-none-any.whl → 1.99.0__py3-none-any.whl

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.
CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.99.0](https://github.com/nominal-io/nominal-client/compare/v1.98.0...v1.99.0) (2025-12-04)
4
+
5
+
6
+ ### Features
7
+
8
+ * allow ingesting .avro files ([#544](https://github.com/nominal-io/nominal-client/issues/544)) ([f5c4561](https://github.com/nominal-io/nominal-client/commit/f5c4561e1db6174a56d6b32b388ed7ad94679fdf))
9
+
3
10
  ## [1.98.0](https://github.com/nominal-io/nominal-client/compare/v1.97.0...v1.98.0) (2025-12-04)
4
11
 
5
12
 
nominal/core/dataset.py CHANGED
@@ -203,6 +203,78 @@ class Dataset(DataSource, RefreshableMixin[scout_catalog.EnrichedDataset]):
203
203
  # Backward compatibility
204
204
  add_to_dataset_from_io = add_from_io
205
205
 
206
+ def add_avro_stream(
207
+ self,
208
+ path: Path | str,
209
+ ) -> DatasetFile:
210
+ """Upload an avro stream file with a specific schema, described below.
211
+
212
+ This is a "stream-like" file format to support
213
+ use cases where a columnar/tabular format does not make sense. This closely matches Nominal's streaming
214
+ API, making it useful for use cases where network connection drops during streaming and a backup file needs
215
+ to be created.
216
+
217
+ If this schema is not used, will result in a failed ingestion.
218
+ {
219
+ "type": "record",
220
+ "name": "AvroStream",
221
+ "namespace": "io.nominal.ingest",
222
+ "fields": [
223
+ {
224
+ "name": "channel",
225
+ "type": "string",
226
+ "doc": "Channel/series name (e.g., 'vehicle_id', 'col_1', 'temperature')",
227
+ },
228
+ {
229
+ "name": "timestamps",
230
+ "type": {"type": "array", "items": "long"},
231
+ "doc": "Array of Unix timestamps in nanoseconds",
232
+ },
233
+ {
234
+ "name": "values",
235
+ "type": {"type": "array", "items": ["double", "string"]},
236
+ "doc": "Array of values. Can either be doubles or strings",
237
+ },
238
+ {
239
+ "name": "tags",
240
+ "type": {"type": "map", "values": "string"},
241
+ "default": {},
242
+ "doc": "Key-value metadata tags",
243
+ },
244
+ ],
245
+ }
246
+
247
+ Args:
248
+ path: Path to the .avro file to upload
249
+
250
+ Returns:
251
+ Reference to the ingesting DatasetFile
252
+
253
+ """
254
+ avro_path = Path(path)
255
+ s3_path = upload_multipart_file(
256
+ self._clients.auth_header,
257
+ self._clients.workspace_rid,
258
+ avro_path,
259
+ self._clients.upload,
260
+ file_type=FileTypes.AVRO_STREAM,
261
+ )
262
+ target = ingest_api.DatasetIngestTarget(
263
+ existing=ingest_api.ExistingDatasetIngestDestination(dataset_rid=self.rid)
264
+ )
265
+ resp = self._clients.ingest.ingest(
266
+ self._clients.auth_header,
267
+ ingest_api.IngestRequest(
268
+ options=ingest_api.IngestOptions(
269
+ avro_stream=ingest_api.AvroStreamOpts(
270
+ source=ingest_api.IngestSource(s3=ingest_api.S3IngestSource(s3_path)),
271
+ target=target,
272
+ )
273
+ )
274
+ ),
275
+ )
276
+ return self._handle_ingest_response(resp)
277
+
206
278
  def add_journal_json(
207
279
  self,
208
280
  path: Path | str,
nominal/core/filetype.py CHANGED
@@ -111,6 +111,7 @@ class FileType(NamedTuple):
111
111
 
112
112
 
113
113
  class FileTypes:
114
+ AVRO_STREAM: FileType = FileType(".avro", "application/avro")
114
115
  BINARY: FileType = FileType("", "application/octet-stream")
115
116
  CSV: FileType = FileType(".csv", "text/csv")
116
117
  CSV_GZ: FileType = FileType(".csv.gz", "text/csv")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nominal
3
- Version: 1.98.0
3
+ Version: 1.99.0
4
4
  Summary: Automate Nominal workflows in Python
5
5
  Project-URL: Homepage, https://nominal.io
6
6
  Project-URL: Documentation, https://docs.nominal.io
@@ -1,4 +1,4 @@
1
- CHANGELOG.md,sha256=gqkvZQ_HzybFgggDMLGPXEt7eyGDq6jDf26HGFVlKLY,80650
1
+ CHANGELOG.md,sha256=52CVvxyESwAGvmBLo5soPa95wuhlqckBIYFLtsSI9zE,80966
2
2
  LICENSE,sha256=zEGHG9mjDjaIS3I79O8mweQo-yiTbqx8jJvUPppVAwk,1067
3
3
  README.md,sha256=KKe0dxh_pHXCtB7I9G4qWGQYvot_BZU8yW6MJyuyUHM,311
4
4
  nominal/__init__.py,sha256=rbraORnXUrNn1hywLXM0XwSQCd9UmQt20PDYlsBalfE,2167
@@ -39,12 +39,12 @@ nominal/core/client.py,sha256=L6IQVEPTiKbOjtbn4G0_R90jbVeOOxpHBHmminGQ3FE,67403
39
39
  nominal/core/connection.py,sha256=ySbPN_a2takVa8wIU9mK4fB6vYLyZnN-qSmXVkLUxAY,5157
40
40
  nominal/core/containerized_extractors.py,sha256=HrcMJzdE-hH66AgYIA0LTeFELsBHa0Sm0vlsKMiIzDU,9501
41
41
  nominal/core/data_review.py,sha256=bEnRsd8LI4x9YOBPcF2H3h5-e12A7Gh8gQfsNUAZmPQ,7922
42
- nominal/core/dataset.py,sha256=gbQYtAYx-fHaewOZUSC7P9CHlMfmdchtTv1XUuNKg3Y,29933
42
+ nominal/core/dataset.py,sha256=q8V5ULrGO-wHBbhm7_Qd_nXzp-D5FTQGfyYbIxhIvjI,32567
43
43
  nominal/core/dataset_file.py,sha256=oENANJ17A4K63cZ8Fr7lUm_kVPyA4fL2rUsZ3oXXk2U,16396
44
44
  nominal/core/datasource.py,sha256=D9jHirAzUZ0pc3nW1XIURpw1UqQoA2E-nUUylZR1jbE,16707
45
45
  nominal/core/event.py,sha256=D8qIX_dTjfSHN7jFW8vV-9htbQTaqk9VvRfK7t-sbbw,5891
46
46
  nominal/core/exceptions.py,sha256=GUpwXRgdYamLl6684FE8ttCRHkBx6WEhOZ3NPE-ybD4,2671
47
- nominal/core/filetype.py,sha256=OgUWR9Ebr-KGVNoXZCnxlHZh9Tp3g9kY1VeTv4TULPQ,5399
47
+ nominal/core/filetype.py,sha256=jAPe6F7pDT8ixsD2-Y8eJdHOxgimdEQte4RQybWwsos,5465
48
48
  nominal/core/log.py,sha256=z3hI3CIEyMwpUSWjwBsJ6a3JNGzBbsmrVusSU6uI7CY,3885
49
49
  nominal/core/run.py,sha256=IvKyvyQ9sOefQQorDbOo1KHSGNtNN_9OnsJajlgoRSg,14803
50
50
  nominal/core/secret.py,sha256=Ckq48m60i7rktxL9GY-nxHU5v8gHv9F1-JN7_MSf4bM,2863
@@ -102,8 +102,8 @@ nominal/thirdparty/polars/polars_export_handler.py,sha256=hGCSwXX9dC4MG01CmmjlTb
102
102
  nominal/thirdparty/tdms/__init__.py,sha256=6n2ImFr2Wiil6JM1P5Q7Mpr0VzLcnDkmup_ftNpPq-s,142
103
103
  nominal/thirdparty/tdms/_tdms.py,sha256=eiHFTUviyDPDClckNldjs_jTTSH_sdmboKDq0oIGChQ,8711
104
104
  nominal/ts/__init__.py,sha256=hmd0ENvDhxRnzDKGLxIub6QG8LpcxCgcyAct029CaEs,21442
105
- nominal-1.98.0.dist-info/METADATA,sha256=av9CrAtGvlkkUC6pdW1oC7TazjZD1tJNIN46C4G4Jng,1946
106
- nominal-1.98.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
107
- nominal-1.98.0.dist-info/entry_points.txt,sha256=-mCLhxgg9R_lm5efT7vW9wuBH12izvY322R0a3TYxbE,66
108
- nominal-1.98.0.dist-info/licenses/LICENSE,sha256=zEGHG9mjDjaIS3I79O8mweQo-yiTbqx8jJvUPppVAwk,1067
109
- nominal-1.98.0.dist-info/RECORD,,
105
+ nominal-1.99.0.dist-info/METADATA,sha256=PEAgXJMK7XkQoxWyji_iTfWdSiZ31DcdzRBjVqF6Ixc,1946
106
+ nominal-1.99.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
107
+ nominal-1.99.0.dist-info/entry_points.txt,sha256=-mCLhxgg9R_lm5efT7vW9wuBH12izvY322R0a3TYxbE,66
108
+ nominal-1.99.0.dist-info/licenses/LICENSE,sha256=zEGHG9mjDjaIS3I79O8mweQo-yiTbqx8jJvUPppVAwk,1067
109
+ nominal-1.99.0.dist-info/RECORD,,