sdk/python/feast/infra/online_stores/astra.py
def _create_cql_update_query(key_space: str, table_name: str,
                             set_columns_value_dict: dict,
                             primary_key_values: dict) -> str:
    """ This function will create an update CQL query"""
    cql_update = "UPDATE " + key_space + "." + table_name + " SET "
    for key in set_columns_value_dict:
        cql_update += key + " = '" + set_columns_value_dict[key] + "', "
    cql_update = cql_update[:-2] + " WHERE "
    # Now where conditions of primary key or composite key
    for key in primary_key_values:
        if primary_key_values[key]["type"] == "str":
            cql_update += key + " = '" + primary_key_values[key]["value"] + "', "
        else:
            cql_update += key + " = " + primary_key_values[key]["value"] + ", "
    cql_update = cql_update[:-2]
    cql_update += ";"
    return cql_update
 This function will create an update CQL query
This function will create an update CQL query
This function will create an update CQL query
def _create_cql_update_query(key_space: str, table_name: str,
                             set_columns_value_dict: dict,
                             primary_key_values: dict) -> str:
    cql_update = "UPDATE " + key_space + "." + table_name + " SET "
    for key in set_columns_value_dict:
        cql_update += key + " = '" + set_columns_value_dict[key] + "', "
    cql_update = cql_update[:-2] + " WHERE "
    for key in primary_key_values:
        if primary_key_values[key]["type"] == "str":
            cql_update += key + " = '" + primary_key_values[key]["value"] + "', "
        else:
            cql_update += key + " = " + primary_key_values[key]["value"] + ", "
    cql_update = cql_update[:-2]
    cql_update += ";"
    return cql_update
def _create_cql_update_query ( key_space : str , table_name : str , set_columns_value_dict : dict , primary_key_values : dict ) -> str : cql_update = "UPDATE " + key_space + "." + table_name + " SET " for key in set_columns_value_dict : cql_update += key + " = '" + set_columns_value_dict [ key ] + "', " cql_update = cql_update [ : - 2 ] + " WHERE " for key in primary_key_values : if primary_key_values [ key ] [ "type" ] == "str" : cql_update += key + " = '" + primary_key_values [ key ] [ "value" ] + "', " else : cql_update += key + " = " + primary_key_values [ key ] [ "value" ] + ", " cql_update = cql_update [ : - 2 ] cql_update += ";" return cql_update
This function will create an update CQL query
This function will create an update CQL query
""" This function will create an update CQL query""" # Now where conditions of primary key or composite key

key_space
str
table_name
str
set_columns_value_dict
dict
primary_key_values
dict