Skip to content

Writes a batch of Records to one or more FeatureGroups

Description

Writes a batch of Records to one or more FeatureGroups. Use this API for bulk ingestion of records into the OnlineStore and OfflineStore.

You can set the ingested records to expire at a given time to live (TTL) duration after the record's event time by specifying the TtlDuration parameter. A request level TtlDuration applies to all entries that do not specify their own TtlDuration.

Usage

sagemakerfeaturestoreruntime_batch_write_record(Entries, TtlDuration)

Arguments

  • Entries

[required] A list of records to write. Each entry specifies the FeatureGroup, the record data, and optionally target stores and a TTL duration.

  • TtlDuration

Time to live duration applied to all entries in the batch that do not specify their own TtlDuration; ExpiresAt = EventTime + TtlDuration. For information on HardDelete, see the delete_record API in the Amazon SageMaker API Reference guide.

Value

A list with the following syntax:

list(
  Errors = list(
    list(
      Entry = list(
        FeatureGroupName = "string",
        Record = list(
          list(
            FeatureName = "string",
            ValueAsString = "string",
            ValueAsStringList = list(
              "string"
            )
          )
        ),
        TargetStores = list(
          "OnlineStore"|"OfflineStore"
        ),
        TtlDuration = list(
          Unit = "Seconds"|"Minutes"|"Hours"|"Days"|"Weeks",
          Value = 123
        )
      ),
      ErrorCode = "string",
      ErrorMessage = "string"
    )
  ),
  UnprocessedEntries = list(
    list(
      FeatureGroupName = "string",
      Record = list(
        list(
          FeatureName = "string",
          ValueAsString = "string",
          ValueAsStringList = list(
            "string"
          )
        )
      ),
      TargetStores = list(
        "OnlineStore"|"OfflineStore"
      ),
      TtlDuration = list(
        Unit = "Seconds"|"Minutes"|"Hours"|"Days"|"Weeks",
        Value = 123
      )
    )
  )
)

Request syntax

svc$batch_write_record(
  Entries = list(
    list(
      FeatureGroupName = "string",
      Record = list(
        list(
          FeatureName = "string",
          ValueAsString = "string",
          ValueAsStringList = list(
            "string"
          )
        )
      ),
      TargetStores = list(
        "OnlineStore"|"OfflineStore"
      ),
      TtlDuration = list(
        Unit = "Seconds"|"Minutes"|"Hours"|"Days"|"Weeks",
        Value = 123
      )
    )
  ),
  TtlDuration = list(
    Unit = "Seconds"|"Minutes"|"Hours"|"Days"|"Weeks",
    Value = 123
  )
)