class RandomDataSource(CodableBatchDataSource, DataFileReference, WritableFeatureSource): (source)
Constructors: RandomDataSource.with_values(values, seed)
, RandomDataSource(default_data_size, seed, partial_data)
The DummyDataBatchSource is a data source that generates random data for a given request. This can be useful for testing and development purposes.
It will use the data types and constraints defined on a feature to generate the data.
```python from aligned import feature_view, Int64, String, DummyDataBatchSource
- @feature_view(
- source=RandomDataSource(),
) class MyView:
passenger_id = Int64().as_entity() survived = Bool() age = Float().lower_bound(0).upper_bound(100) name = String() sex = String().accepted_values(["male", "female"])
```
Class Method | multi |
Undocumented |
Static Method | with |
Undocumented |
Method | __init__ |
Undocumented |
Method | all |
Undocumented |
Method | all |
Undocumented |
Method | depends |
Undocumented |
Async Method | insert |
Undocumented |
Method | job |
A key defining which sources can be grouped together in one request. |
Async Method | overwrite |
Undocumented |
Async Method | schema |
Returns the schema for the data source |
Async Method | upsert |
Undocumented |
Async Method | write |
Undocumented |
Class Variable | type |
Undocumented |
Instance Variable | default |
Undocumented |
Instance Variable | raw |
Undocumented |
Instance Variable | seed |
Undocumented |
Property | partial |
Undocumented |
Inherited from CodableBatchDataSource
:
Class Method | _deserialize |
Undocumented |
Method | _serialize |
Undocumented |
Inherited from BatchDataSource
(via CodableBatchDataSource
):
Method | __hash__ |
Undocumented |
Method | all |
Undocumented |
Method | all |
Undocumented |
Async Method | feature |
Setup the code needed to represent the data source as a feature view |
Method | features |
Undocumented |
Method | filter |
Undocumented |
Async Method | freshness |
.table("my_table") .freshness() |
Method | location |
Undocumented |
Method | source |
An id that identifies a source from others. |
Method | tags |
Undocumented |
Method | transform |
Undocumented |
Method | with |
Undocumented |
Method | with |
Undocumented |
Inherited from DataFileReference
(via CodableBatchDataSource
, BatchDataSource
):
Async Method | read |
Undocumented |
Async Method | to |
Undocumented |
Async Method | to |
Undocumented |
Async Method | to |
Undocumented |
Async Method | write |
Undocumented |
def multi_source_features_for(cls:
type[ RandomDataSource]
, facts: RetrivalJob
, requests: list[ tuple[ RandomDataSource, RetrivalRequest]]
) -> RetrivalJob
:
(source)
¶
Undocumented
def with_values(values:
dict[ str, object]
, seed: int | None
= None) -> RandomDataSource
:
(source)
¶
Undocumented
int
= 10000, seed: int | None
= None, partial_data: pl.DataFrame | None
= None):
(source)
¶
Undocumented
RetrivalRequest
, start_date: datetime
, end_date: datetime
) -> RetrivalJob
:
(source)
¶
Undocumented
Returns the schema for the data source
`python source = FileSource.parquet_at('test_data/titanic.parquet') schema = await source.schema() >>> {'passenger_id': FeatureType(name='int64'), ...} `
- Returns:
- dict[str, FeatureType]: A dictionary containing the column name and the feature type