Ingest service (gRPC)#
Starts V2 ingest jobs and returns the RID used to track asynchronous progress.
Endpoints#
Ingest#
gRPC /nominal.ingest.v2.IngestService/Ingest
Submit a V2 ingest job.
Request: IngestRequest
dataset_ridstring requiredExisting dataset that all items in this job will ingest into.
runs_to_expandarray of string
itemsarray ofIngestItemUnits of ingest work to submit under one ingest job RID. At least 1 item.
Fields of
IngestItemtagsmap of string to stringTags applied only to this ingest item. These override request-level tags on conflict.
- one of 7 fields required
fileFileIngestItem
Fields of
FileIngestItemsourceIngestSourcerequired
Fields of
IngestSource- one of
s3,gcs,presigned_file,file_storerequired
s3S3IngestSource
Fields of
S3IngestSourcepathstring required
gcsGcsIngestSource
Fields of
GcsIngestSourcepathstring required
presigned_filePresignedFileIngestSource
Fields of
PresignedFileIngestSourceurlstring required
file_storeFileStoreIngestSourceInitially supported for direct file ingest only.
Fields of
FileStoreIngestSourcefile_revision_ridstringResolved File Store content target to ingest.
- one of
ingestFileIngestOptionsrequired
Fields of
FileIngestOptionstimestamp_metadataingest.v2.TimestampMetadatarequired
Fields of
ingest.v2.TimestampMetadatacolumnstring required
typeTimestampTyperequired
Fields of
TimestampType- one of
relative,absoluterequired
relativeRelativeTimestamp
Fields of
RelativeTimestamptime_unitstringUnit in which relative offsets are expressed. Aliases the classic REST TimeUnit alias.
offsetstring (date-time)Starting timestamp to use when indexing the file.
absoluteAbsoluteTimestamp
Fields of
AbsoluteTimestamp- one of
iso8601,epoch_of_time_unit,custom_formatrequired
iso8601Iso8601Timestamp
Request
import grpc from nominal.protos.ingest.v2 import ingest_service_pb2, ingest_service_pb2_grpc channel = grpc.secure_channel("api.gov.nominal.io:443", grpc.ssl_channel_credentials()) ingest_service = ingest_service_pb2_grpc.IngestServiceStub(channel) auth = [("authorization", "Bearer <api key>")] request = ingest_service_pb2.IngestRequest(dataset_rid="<dataset rid>") response = ingest_service.Ingest(request, metadata=auth) print(response)
package main import ( "context" "crypto/tls" "fmt" "log" ingestv2 "github.com/nominal-io/nominal-api-protos-go/nominal/protos/ingest/v2" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/metadata" ) func main() { conn, err := grpc.NewClient("api.gov.nominal.io:443", grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{}))) if err != nil { log.Fatal(err) } defer conn.Close() ingestService := ingestv2.NewIngestServiceClient(conn) ctx := metadata.AppendToOutgoingContext(context.Background(), "authorization", "Bearer <api key>") request := &ingestv2.IngestRequest{ DatasetRid: "<dataset rid>", } response, err := ingestService.Ingest(ctx, request) if err != nil { log.Fatal(err) } fmt.Println(response) }
Response
{ "ingest_job_rid": "<ingest job rid>" }
Types#
AbsoluteTimestamp#
Absolute timestamp parser variants.
Set exactly one of the fields below.
- one of
iso8601,epoch_of_time_unit,custom_formatrequired
AvroIngestOptions#
Avro ingest options.
A message with no fields.
ContainerizedIngestItem#
One containerized extractor invocation. Input sources are bound to environment variables.
extractor_ridstring required
sourcesmap of string toIngestSource
argumentsmap of string to string
timestamp_metadataingest.v2.TimestampMetadata
CsvFormat#
Set exactly one of the fields below.
- one of
wide,longrequired
wideWideFormat
longLongFormat
CsvIngestOptions#
CSV ingest options.
data_row must be greater than header_row. units_row must not be header_row. units_row must be less than data_row, which defaults to header_row + 1.
formatCsvFormatrequired
header_rowintegerOne-based record number of the header, defaulting to 1; must be positive. Records are counted from 1, a multiline record counts as one, and blank lines are ignored. Greater than 0.
data_rowintegerOne-based record number of the first data record, defaulting to header_row + 1; must be greater than header_row. Records that fall between header_row and data_row are skipped. Greater than 0.
units_rowintegerOne-based record number holding each column’s unit; must not be header_row and must precede data_row, so reading a units row requires setting data_row past it. Cells match columns by position, so the record needs a placeholder cell for the timestamp column, and a column whose cell is empty gets no unit. Absent means no units row. FileIngestOptions.units overrides a unit read here, per channel. Greater than 0.
CustomTimestamp#
Absolute timestamps parsed with a user-supplied format string.
formatstringThe format string should be in the format of the
DateTimeFormatterclass in Java.default_yearintegerDefault year is accepted as an optional field for cases like IRIG time format. Will be overridden by year in time format.
default_day_of_yearintegerDefault day of year is accepted as an optional field for cases like IRIG time format. Will be overridden by day of year in time format. From 1 to 366.
DataflashIngestItem#
One ArduPilot dataflash log conversion. Worker-mcap converts the log into an avro stream that is then ingested into the dataset.
sourceIngestSourcerequired
EpochTimestamp#
Absolute timestamps expressed as an integer count of some time unit since the Unix epoch.
time_unitstringUnit in which epoch values are expressed (e.g. SECONDS, MILLISECONDS).
FileIngestItem#
Direct file ingest work.
sourceIngestSourcerequired
ingestFileIngestOptionsrequired
FileIngestOptions#
Direct file ingest mode.
Set exactly one of
csv,parquet,avro.timestamp_metadataingest.v2.TimestampMetadatarequired
unitsmap of string to stringUnit per channel. Overrides the unit read from CsvIngestOptions.units_row for the channels named here; channels absent from this map keep their units-row unit.
channel_prefixstring
channel_name_overridesmap of string to stringRenames individual columns to explicit channel names. Composes with channel_prefix: final name = channel_prefix + channel_name_overrides.getOrDefault(column, column). At most 1000 entries may be provided. Resolved channel names must be unique across columns; renaming a column onto another column’s name fails the ingest.
- one of
csv,parquet,avrorequired
FileStoreIngestSource#
File Store source. The resolved file RID supplies provider-specific pinning and dereference metadata.
file_revision_ridstringResolved File Store content target to ingest.
GcsIngestSource#
pathstring required
ingest.v2.TimestampMetadata#
Timestamp metadata for ingest items that derive timestamps from an input column or field.
columnstring required
typeTimestampTyperequired
IngestItem#
One unit of ingest work submitted under a single ingest job.
Set exactly one of
file,log,containerized,video,point_cloud,mcap,dataflash.tagsmap of string to stringTags applied only to this ingest item. These override request-level tags on conflict.
- one of 7 fields required
fileFileIngestItem
logLogIngestItem
containerizedContainerizedIngestItem
videoVideoIngestItem
point_cloudPointCloudIngestItem
mcapMcapIngestItem
dataflashDataflashIngestItem
IngestSource#
Source file location.
Set exactly one of the fields below.
- one of
s3,gcs,presigned_file,file_storerequired
s3S3IngestSource
gcsGcsIngestSource
presigned_filePresignedFileIngestSource
file_storeFileStoreIngestSourceInitially supported for direct file ingest only.
Iso8601Timestamp#
Absolute timestamps serialized in ISO-8601 form. No additional parser configuration is needed.
A message with no fields.
LogIngestItem#
Single-channel log or journal ingest work.
sourceIngestSourcerequired
channelstring
timestamp_metadataingest.v2.TimestampMetadata
message_fieldstringJSON field whose value becomes the log message. Defaults to the journald MESSAGE field.
LongFormat#
Long format: each row or record contains one channel, timestamp, and value sample.
channel_columnstringDefaults to “channel”.
value_columnstringDefaults to “value”.
tags_columnstringDefaults to “tags”.
McapChannelLocator#
Locates the video’s channel within an mcap file. Topics are not guaranteed unique, so an mcap file with duplicate topics must be located by id.
Set exactly one of the fields below.
- one of
topic,idrequired
topicstring
idinteger
McapChannelSelection#
Selects mcap channels by topic name. All channels are ingested when neither list is set.
Set at most one of the fields below.
- one of
include_topics,exclude_topics
include_topicsMcapTopicNames
exclude_topicsMcapTopicNames
McapIngestItem#
One mcap file conversion. Worker-mcap converts the file’s protobuf channels into an avro stream that is then ingested into the dataset.
sourceIngestSourcerequired
channelsMcapChannelSelectionWhich mcap channels to ingest, selected by topic name. All channels when unset.
ignore_invalid_topicsbooleanSkip topics whose schemas cannot be decoded instead of failing the conversion.
McapTimestampManifest#
Frame timestamps are embedded in the mcap file that carries the video frames, rather than supplied as a sidecar manifest.
channel_locatorMcapChannelLocatorrequired
McapTopicNames#
topicsarray of string
NoTimestampManifest#
starting_timestampstring (date-time) required
scale_parameterScaleParameter
ParquetFormat#
Set exactly one of the fields below.
- one of
wide,longrequired
wideWideFormat
longLongFormat
ParquetIngestOptions#
Parquet ingest options.
formatParquetFormatrequired
is_archiveboolean
PointCloudIngestItem#
Dataset-backed point cloud ingest work.
sourceIngestSourcerequired
ingestPointCloudIngestOptionsrequired
PointCloudIngestOptions#
sensor_metadataPointCloudSensorMetadata
channelstring required
PointCloudSensorMetadata#
Placeholder for point-cloud sensor metadata until the spatial metadata proto is promoted.
propertiesmap of string to string
PresignedFileIngestSource#
urlstring required
RelativeTimestamp#
Relative timestamp parser: interprets each row’s timestamp as an offset from a fixed origin.
time_unitstringUnit in which relative offsets are expressed. Aliases the classic REST TimeUnit alias.
offsetstring (date-time)Starting timestamp to use when indexing the file.
S3IngestSource#
pathstring required
ScaleParameter#
Set exactly one of the fields below.
- one of
true_frame_rate,ending_timestamp,scale_factorrequired
true_frame_ratenumber
ending_timestampstring (date-time)
scale_factornumber
TimestampManifestFiles#
Sidecar manifest files whose per-frame timestamps are concatenated in list order. Used when a video’s frame timestamps are recorded across several files.
sourcesarray ofIngestSourceAt least 1 item.
TimestampType#
Selects between relative-offset and absolute-timestamp parsing strategies.
Set exactly one of the fields below.
- one of
relative,absoluterequired
relativeRelativeTimestamp
absoluteAbsoluteTimestamp
VideoIngestItem#
Dataset-file-backed video ingest work.
sourceIngestSourcerequired
ingestVideoIngestOptionsrequired
additional_sourcesarray ofIngestSourceVideos appended in order after
source, ingested as one continuous recording on the channel. Each becomes its own dataset file. The first file starts at the no-manifest starting timestamp and each later file starts where the previous one ends. Requires a no_manifest timestamp manifest and sources other than File Store; at most 99, so 100 files in all. At most 99 items.
VideoIngestOptions#
timestamp_manifestVideoTimestampManifestrequired
channelstring required
overwrite_segmentsboolean
VideoTimestampManifest#
Set exactly one of the fields below.
- one of
no_manifest,timestamp_manifest_files,mcaprequired
no_manifestNoTimestampManifest
timestamp_manifest_filesTimestampManifestFiles
mcapMcapTimestampManifest
WideFormat#
Wide format: each row or record contains one timestamp and many channels as columns.
tag_columnsmap of string to string
exclude_columnsarray of string
Page design based on Scalar, MIT License.
- one of
- one of