sdk/python/feast/infra/online_stores/astra.py
def online_write_batch(
        self,
            config: RepoConfig,
            table: Union[FeatureTable, FeatureView],
            data: List[
                Tuple[EntityKeyProto, Dict[str, ValueProto], datetime, Optional[datetime]]
            ],
            progress: Optional[Callable[[int], Any]],
    ) -> None:
        """
        A function that will take features and store in specified data
        :param config:
        :param table:
        :param data:
        :param progress:
        :return:
        """
        project = config.project
        for entity_key, values, timestamp, created_ts in data:
            entity_key_bin = serialize_entity_key(entity_key)
            timestamp = _to_naive_utc(timestamp)
            if created_ts is not None:
                created_ts = _to_naive_utc(created_ts)
            for feature_name, val in values.items():
                table_name = _table_id(project, table)
                keyspace = config.online_store.keyspace

                # Now create Insert command
                insert_cql = _create_cql_insert_record(keyspace,
                                                       table_name,
                                                       column_names=["entity_key",
                                                                     "feature_name",
                                                                     "value",
                                                                     "event_ts",
                                                                     "created_ts"])
                values = [entity_key_bin,
                          feature_name,
                          val.SerializeToString(),
                          timestamp,
                          created_ts]
                self._session = self._initialize_astra_session(config.online_store)
                prepared = self._session.prepare(insert_cql)
                self._session.execute(
                    prepared.bind(values))

        A function that will take features and store in specified data
        :param config:
        :param table:
        :param data:
        :param progress:
        :return:
        
A function that will take features and store in specified data
A function that will take features and store in specified data
def online_write_batch(
        self,
            config: RepoConfig,
            table: Union[FeatureTable, FeatureView],
            data: List[
                Tuple[EntityKeyProto, Dict[str, ValueProto], datetime, Optional[datetime]]
            ],
            progress: Optional[Callable[[int], Any]],
    ) -> None:
        project = config.project
        for entity_key, values, timestamp, created_ts in data:
            entity_key_bin = serialize_entity_key(entity_key)
            timestamp = _to_naive_utc(timestamp)
            if created_ts is not None:
                created_ts = _to_naive_utc(created_ts)
            for feature_name, val in values.items():
                table_name = _table_id(project, table)
                keyspace = config.online_store.keyspace
                insert_cql = _create_cql_insert_record(keyspace,
                                                       table_name,
                                                       column_names=["entity_key",
                                                                     "feature_name",
                                                                     "value",
                                                                     "event_ts",
                                                                     "created_ts"])
                values = [entity_key_bin,
                          feature_name,
                          val.SerializeToString(),
                          timestamp,
                          created_ts]
                self._session = self._initialize_astra_session(config.online_store)
                prepared = self._session.prepare(insert_cql)
                self._session.execute(
                    prepared.bind(values))
def online_write_batch ( self , config : RepoConfig , table : Union [ FeatureTable , FeatureView ] , data : List [ Tuple [ EntityKeyProto , Dict [ str , ValueProto ] , datetime , Optional [ datetime ] ] ] , progress : Optional [ Callable [ [ int ] , Any ] ] , ) -> None : project = config . project for entity_key , values , timestamp , created_ts in data : entity_key_bin = serialize_entity_key ( entity_key ) timestamp = _to_naive_utc ( timestamp ) if created_ts is not None : created_ts = _to_naive_utc ( created_ts ) for feature_name , val in values . items ( ) : table_name = _table_id ( project , table ) keyspace = config . online_store . keyspace insert_cql = _create_cql_insert_record ( keyspace , table_name , column_names = [ "entity_key" , "feature_name" , "value" , "event_ts" , "created_ts" ] ) values = [ entity_key_bin , feature_name , val . SerializeToString ( ) , timestamp , created_ts ] self . _session = self . _initialize_astra_session ( config . online_store ) prepared = self . _session . prepare ( insert_cql ) self . _session . execute ( prepared . bind ( values ) )
A function that will take features and store in specified data
A function that will take features and store in specified data
"""
        A function that will take features and store in specified data
        :param config:
        :param table:
        :param data:
        :param progress:
        :return:
        """ # Now create Insert command

None
self
config
RepoConfig
None
table
Union[FeatureTable, FeatureView]
None
data
List[
                Tuple[EntityKeyProto, Dict[str, ValueProto], datetime, Optional[datetime]]
            ]
None
progress
Optional[Callable[[int], Any]]
None