Online Store Spec
- class databricks.ml_features.online_store_spec.AmazonDynamoDBSpec(*, region: Optional[str], access_key_id: Optional[str] = None, secret_access_key: Optional[str] = None, session_token: Optional[str] = None, table_name: Optional[str] = None, read_secret_prefix: Optional[str] = None, write_secret_prefix: Optional[str] = None, ttl: Optional[timedelta] = None, endpoint_url: Optional[str] = None)
Bases:
OnlineStoreSpecNote
Aliases:
databricks.feature_engineering.online_store_spec.AmazonDynamoDBSpec,databricks.feature_store.online_store_spec.AmazonDynamoDBSpecThis
OnlineStoreSpecimplementation is intended for publishing features to Amazon DynamoDB.If
table_nameis not provided,publish_table()will use the offline store’s database and table name combined as the online table name.To use a different table name in the online store, provide a value for the
table_nameargument.The expected read or write secrets for DynamoDB for a given
{prefix}string are${prefix}-access-key-id,${prefix}-secret-access-key, and${prefix}-session-token.If none of the access_key_id, secret_access_key, and write_secret_prefix are passed, the instance profile attached to the cluster will be used to write to DynamoDB.
- Parameters
region – Region to access online store.
access_key_id – Access key ID that has access to the online store. Deprecated. Use
write_secret_prefixinstead.secret_access_key – Secret access key to access the online store. Deprecated. Use
write_secret_prefixinstead.session_token – Session token to access the online store. Deprecated. Use
write_secret_prefixinstead.table_name – Table name.
read_secret_prefix – Prefix for read secret.
write_secret_prefix – Prefix for write secret.
ttl – The time to live for data published to the online store. This attribute is only applicable when publishing time series feature tables. If the time to live is specified for a time series table,
publish_table()will publish a window of data instead of the latest snapshot.
- property access_key_id
Warning
databricks.ml_features.online_store_spec.amazon_dynamodb_online_store_spec.AmazonDynamoDBSpec.access_key_idis deprecated. This method will be removed in a future release. Usewrite_secret_prefixinstead.Access key ID that has access to the online store. Property will be empty if
write_secret_prefixor the instance profile attached to the cluster are intended to be used.
- property secret_access_key
Warning
databricks.ml_features.online_store_spec.amazon_dynamodb_online_store_spec.AmazonDynamoDBSpec.secret_access_keyis deprecated. This method will be removed in a future release. Usewrite_secret_prefixinstead.Secret access key to access the online store. Property will be empty if
write_secret_prefixor the instance profile attached to the cluster are intended to be used.
- property session_token
Warning
databricks.ml_features.online_store_spec.amazon_dynamodb_online_store_spec.AmazonDynamoDBSpec.session_tokenis deprecated. This method will be removed in a future release. Usewrite_secret_prefixinstead.Session token to access the online store. Property will be empty if
write_secret_prefixor the instance profile attached to the cluster are intended to be used.
- class databricks.ml_features.online_store_spec.AmazonRdsMySqlSpec(hostname: str, port: int, user: Optional[str] = None, password: Optional[str] = None, database_name: Optional[str] = None, table_name: Optional[str] = None, driver_name: Optional[str] = None, read_secret_prefix: Optional[str] = None, write_secret_prefix: Optional[str] = None)
Bases:
OnlineStoreSpecNote
Aliases:
databricks.feature_engineering.online_store_spec.AmazonRdsMySqlSpec,databricks.feature_store.online_store_spec.AmazonRdsMySqlSpecClass that defines and creates
AmazonRdsMySqlSpecobjects.This
OnlineStoreSpecimplementation is intended for publishing features to Amazon RDS MySQL and Aurora (MySQL-compatible edition).See
OnlineStoreSpecdocumentation for more usage information, including parameter descriptions.- Parameters
hostname – Hostname to access online store.
port – Port number to access online store.
user – Username that has access to the online store. Deprecated. Use
write_secret_prefixinstead.password – Password to access the online store. Deprecated. Use
write_secret_prefixinstead.database_name – Database name.
table_name – Table name.
driver_name – Name of custom JDBC driver to access the online store.
read_secret_prefix – Prefix for read secret.
write_secret_prefix – Prefix for write secret.
- class databricks.ml_features.online_store_spec.AzureCosmosDBSpec(*, account_uri: str, database_name: Optional[str] = None, container_name: Optional[str] = None, read_secret_prefix: Optional[str] = None, write_secret_prefix: str, **kwargs)
Bases:
OnlineStoreSpecNote
Aliases:
databricks.feature_engineering.online_store_spec.AzureCosmosDBSpec,databricks.feature_store.online_store_spec.AzureCosmosDBSpecThis
OnlineStoreSpecimplementation is intended for publishing features to Azure Cosmos DB.If
database_nameandcontainer_nameare not provided,publish_table()will use the offline store’s database and table name as the Cosmos DB database and container name.The expected read or write secret for Cosmos DB for a given
{prefix}string is${prefix}-authorization-key.The authorization key can be either the Cosmos DB account primary or secondary key.
- Parameters
account_uri – URI of the Cosmos DB account.
database_name – Database name.
container_name – Container name.
read_secret_prefix – Prefix for read secret.
write_secret_prefix – Prefix for write secret.
- property target_throughput_threshold_for_provisioned
Threshold for handling CosmosDB Requests Units. Note that this is for CosmosDB Provisioned Throughput, so you need to specify a number between 0 and 1 indicating the percentage.
- class databricks.ml_features.online_store_spec.AzureMySqlSpec(hostname: str, port: int, user: Optional[str] = None, password: Optional[str] = None, database_name: Optional[str] = None, table_name: Optional[str] = None, driver_name: Optional[str] = None, read_secret_prefix: Optional[str] = None, write_secret_prefix: Optional[str] = None)
Bases:
OnlineStoreSpecNote
Aliases:
databricks.feature_engineering.online_store_spec.AzureMySqlSpec,databricks.feature_store.online_store_spec.AzureMySqlSpecDefine the
AzureMySqlSpecclass.This
OnlineStoreSpecimplementation is intended for publishing features to Azure Database for MySQL.See
OnlineStoreSpecdocumentation for more usage information, including parameter descriptions.- Parameters
hostname – Hostname to access online store.
port – Port number to access online store.
user – Username that has access to the online store. Deprecated. Use
write_secret_prefixinstead.password – Password to access the online store. Deprecated. Use
write_secret_prefixinstead.database_name – Database name.
table_name – Table name.
driver_name – Name of custom JDBC driver to access the online store.
read_secret_prefix – Prefix for read secret.
write_secret_prefix – Prefix for write secret.
- class databricks.ml_features.online_store_spec.AzureSqlServerSpec(hostname: str, port: int, user: Optional[str] = None, password: Optional[str] = None, database_name: Optional[str] = None, table_name: Optional[str] = None, driver_name: Optional[str] = None, read_secret_prefix: Optional[str] = None, write_secret_prefix: Optional[str] = None)
Bases:
OnlineStoreSpecNote
Aliases:
databricks.feature_engineering.online_store_spec.AzureSqlServerSpec,databricks.feature_store.online_store_spec.AzureSqlServerSpecThis
OnlineStoreSpecimplementation is intended for publishing features to Azure SQL Database (SQL Server).The spec supports SQL Server 2019 and newer.
See
OnlineStoreSpecdocumentation for more usage information, including parameter descriptions.- Parameters
hostname – Hostname to access online store.
port – Port number to access online store.
user – Username that has access to the online store. Deprecated. Use
write_secret_prefixinstead.password – Password to access the online store. Deprecated. Use
write_secret_prefixinstead.database_name – Database name.
table_name – Table name.
driver_name – Name of custom JDBC driver to access the online store.
read_secret_prefix – Prefix for read secret.
write_secret_prefix – Prefix for write secret.
- class databricks.ml_features.online_store_spec.OnlineStoreSpec(_type, hostname: [<class 'str'>, None] = None, port: [<class 'int'>, None] = None, user: ~typing.Optional[str] = None, password: ~typing.Optional[str] = None, database_name: ~typing.Optional[str] = None, table_name: ~typing.Optional[str] = None, driver_name: ~typing.Optional[str] = None, read_secret_prefix: ~typing.Optional[str] = None, write_secret_prefix: ~typing.Optional[str] = None, _internal_properties: ~typing.Optional[~typing.Dict[str, str]] = None)
Bases:
ABCNote
Aliases:
databricks.feature_engineering.online_store_spec.OnlineStoreSpec,databricks.feature_store.online_store_spec.OnlineStoreSpecParent class for all types of
OnlineStoreSpecobjects.Abstract base class for classes that specify the online store to publish to.
If
database_nameandtable_nameare not provided,publish_table()will use the offline store’s database and table names.To use a different database and table name in the online store, provide values for both
database_nameandtable_namearguments.The JDBC driver can be customized with the optional
driver_nameargument. Otherwise, a default is used.Strings in the primary key should not exceed 100 characters.
The online database should already exist.
Note
It is strongly suggested (but not required), to provide read-only database credentials via the
read_secret_prefixin order to grant the least amount of database access privileges to the served model. When providing aread_secret_prefix, the secrets must exist in the scope name using the expected format, otherwisepublish_table()will return an error.- Parameters
hostname – Hostname to access online store. The database hostname cannot be changed. Subsequent publish calls to the same online store must provide the same hostname.
port – Port number to access online store. The database port cannot be changed. Subsequent publish calls to the same online store must provide the same port.
user – Username that has write access to the online store. Deprecated. Use
write_secret_prefixinstead.password – Password to access the online store. Deprecated. Use
write_secret_prefixinstead.database_name – Database name.
table_name – Table name.
driver_name – Name of custom JDBC driver to access the online store.
read_secret_prefix –
The secret scope name and secret key name prefix where read-only online store credentials are stored. These credentials will be used during online feature serving to connect to the online store from the served model. The format of this parameter should be
${scope-name}/${prefix}, which is the name of the secret scope, followed by a/, followed by the secret key name prefix. The scope passed in must contain the following keys and corresponding values:${prefix}-userwhere${prefix}is the value passed into this function. For example if this function is called withdatascience/staging, thedatasciencesecret scope should contain the secret namedstaging-user, which points to a secret value with the database username for the online store.${prefix}-passwordwhere${prefix}is the value passed into this function. For example if this function is called withdatascience/staging, thedatasciencesecret scope should contain the secret namedstaging-password, which points to a secret value with the database password for the online store.
Once the read_secret_prefix is set for an online store, it cannot be changed.
write_secret_prefix –
The secret scope name and secret key name prefix where read-write online store credentials are stored. These credentials will be used to connect to the online store to publish features. If
userandpasswordare passed, this field must beNone, or an exception will be raised. The format of this parameter should be${scope-name}/${prefix}, which is the name of the secret scope, followed by a/, followed by the secret key name prefix. The scope passed in must contain the following keys and corresponding values:${prefix}-userwhere${prefix}is the value passed into this function. For example if this function is called withdatascience/staging, thedatasciencesecret scope should contain the secret namedstaging-user, which points to a secret value with the database username for the online store.${prefix}-passwordwhere${prefix}is the value passed into this function. For example if this function is called withdatascience/staging, thedatasciencesecret scope should contain the secret namedstaging-password, which points to a secret value with the database password for the online store.
- property user
Warning
databricks.ml_features.online_store_spec.online_store_spec.OnlineStoreSpec.useris deprecated. This method will be removed in a future release. Usewrite_secret_prefixinstead.Username that has access to the online store.
Property will be empty if
write_secret_prefixargument was used.
- property password
Warning
databricks.ml_features.online_store_spec.online_store_spec.OnlineStoreSpec.passwordis deprecated. This method will be removed in a future release. Usewrite_secret_prefixinstead.Password to access the online store.
Property will be empty if
write_secret_prefixargument was used.
- property read_secret_prefix
Prefix for read access to online store.
Name of the secret scope and prefix that contains the username and password to access the online store with read-only credentials.
See the
read_secret_prefixparameter description for details.