featurebyte.FeatureStore.create¶
create(
name: str,
source_type: SourceType,
details: Union[SnowflakeDetails, SparkDetails, SQLiteDetails, DatabricksDetails, DatabricksUnityDetails, BigQueryDetails, TestDatabaseDetails],
database_credential: Union[UsernamePasswordCredential, AccessTokenCredential, KerberosKeytabCredential, GoogleCredential, NoneType]=None,
storage_credential: Union[S3StorageCredential, GCSStorageCredential, AzureBlobStorageCredential, NoneType]=None
) -> FeatureStoreDescription¶
Creates and saves a Feature Store object to enable FeatureByte to work with a data warehouse. FeatureByte leverages a data warehouse as both a data source and a feature store.
To create a feature store, you need to specify the connection details and credentials to use.
Note that featurestore is one-off task. Only one feature store can be created for a specific set of database details.
Parameters¶
- name: str
Name of the feature store. - source_type: SourceType
Type of the feature store. - details: Union[SnowflakeDetails, SparkDetails, SQLiteDetails, DatabricksDetails, DatabricksUnityDetails, BigQueryDetails, TestDatabaseDetails]
Details of the database to use for the feature store. - database_credential: Union[UsernamePasswordCredential, AccessTokenCredential, KerberosKeytabCredential, GoogleCredential, NoneType]
Credential details to use when connecting to the database. - storage_credential: Union[S3StorageCredential, GCSStorageCredential, AzureBlobStorageCredential, NoneType]
Credential details to use when connecting to the storage.
Returns¶
- FeatureStore
Examples¶
>>> feature_store = fb.FeatureStore.create(
... name="playground",
... source_type=SourceType.SPARK,
... details=fb.SparkDetails(
... host="spark-thrift",
... http_path="cliservice",
... port=10000,
... storage_type="file",
... storage_url="/data/staging/featurebyte",
... storage_path="file:///opt/spark/data/staging/featurebyte",
... catalog_name="spark_catalog",
... schema_name="playground",
... ),
... )