Gets the details of a feature view, including its field definitions, data source binding, and synchronization status.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
featurestore:GetFeatureView |
get |
*All Resource
|
None | None |
Request syntax
GET /api/v1/instances/{InstanceId}/featureviews/{FeatureViewId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. You can call |
fs-cn-******** |
| FeatureViewId |
string |
Yes |
The feature view ID. You can call |
3 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The schema of the response. |
||
| RequestId |
string |
The request ID. |
72F15A8A-5A28-5B18-A0DE-0EABD7D3245A |
| ProjectId |
string |
The project ID. |
3 |
| ProjectName |
string |
The project name. |
project1 |
| FeatureEntityName |
string |
The feature entity name. |
featureEntity1 |
| Name |
string |
The feature view name. |
featureView1 |
| Owner |
string |
The Alibaba Cloud account ID of the owner. |
12321421412**** |
| Type |
string |
The type of the feature view. Valid values: ● ● |
Batch |
| GmtCreateTime |
string |
The creation time. |
2021-12-15T23:24:33.132+08:00 |
| GmtModifiedTime |
string |
The modification time. |
2021-12-15T23:24:33.132+08:00 |
| FeatureEntityId |
string |
The feature entity ID. |
3 |
| JoinId |
string |
The join ID of the feature entity. |
user_id |
| WriteMethod |
string |
The write method. Valid values: ● ● |
custom |
| RegisterTable |
string |
The name of the registered table. |
table1 |
| RegisterDatasourceId |
string |
The ID of the data source where the registered table resides. |
4 |
| RegisterDatasourceName |
string |
The name of the data source where the registered table resides. |
datasource1 |
| WriteToFeatureDB |
boolean |
Indicates whether to write data to the online managed storage. |
false |
| SyncOnlineTable |
boolean |
Indicates whether to synchronize the online feature table. |
true |
| TTL |
integer |
The time to live (TTL). |
86400 |
| Tags |
array |
The list of tags. |
|
|
string |
A tag for the feature view. |
tag1 |
|
| Config |
string |
The configuration. |
{"save_original_field":true} |
| GmtSyncTime |
string |
The synchronization time. |
2021-12-15T23:24:33.132+08:00 |
| LastSyncConfig |
string |
The most recent synchronization configuration. |
{ "mode": "overwrite", "partitions": { "ds": { "value": "20230820" } }, "event_time": "", "config": {}, "offline_to_online": true } |
| Fields |
array<object> |
The list of fields. |
|
|
array<object> |
|||
| Name |
string |
The field name. |
user |
| Type |
string |
The data type of the field. Valid values: ● ● ● |
int |
| Attributes |
array |
The list of field attributes. Valid values: ● ● ● |
|
|
string |
A field attribute. |
Partition |
|
| Transform |
array<object> |
The feature transformation. |
|
|
array<object> |
|||
| Type |
string |
The feature transformation type. |
LLMEmbedding |
| LLMConfigId |
integer |
The LLM configuration ID. |
1 |
| Input |
array<object> |
The input for the feature transformation. |
|
|
object |
|||
| Name |
string |
The feature name. |
feature1 |
| Type |
string |
The feature type. |
STRING |
| Modality |
string |
The modality type. |
TEXT |
| PublishTableScript |
string |
The script for data synchronization. |
from feature_store_py.fs_client import FeatureStoreClient\nimport datetime\nfrom feature_store_py.fs_datasource import MaxComputeDataSource\nimport sys\n\ncur_day = args['dt']\nprint('cur_day = ', cur_day)\n\naccess_key_id = o.account.access_id\naccess_key_secret = o.account.secret_access_key\nfs = FeatureStoreClient(access_key_id=access_key_id, access_key_secret=access_key_secret, region='cn-beijing')\ncur_project_name = 'p1'\nproject = fs.get_project(cur_project_name)\n\nfeature_view_name = 'user_fea'\nbatch_feature_view = project.get_feature_view(feature_view_name)\ntask = batch_feature_view.publish_table(partitions={'ds':cur_day}, mode='Overwrite')\ntask.wait()\ntask.print_summary()\n |
| MockTableName |
string |
The name of the mock data table for the stream feature view. |
item_table_mock_1 |
Examples
Success response
JSON format
{
"RequestId": "72F15A8A-5A28-5B18-A0DE-0EABD7D3245A",
"ProjectId": "3",
"ProjectName": "project1",
"FeatureEntityName": "featureEntity1",
"Name": "featureView1",
"Owner": "12321421412****",
"Type": "Batch",
"GmtCreateTime": "2021-12-15T23:24:33.132+08:00",
"GmtModifiedTime": "2021-12-15T23:24:33.132+08:00",
"FeatureEntityId": "3",
"JoinId": "user_id",
"WriteMethod": "custom",
"RegisterTable": "table1",
"RegisterDatasourceId": "4",
"RegisterDatasourceName": "datasource1",
"WriteToFeatureDB": false,
"SyncOnlineTable": true,
"TTL": 86400,
"Tags": [
"tag1"
],
"Config": "{\"save_original_field\":true}",
"GmtSyncTime": "2021-12-15T23:24:33.132+08:00",
"LastSyncConfig": "{\n\t\"mode\": \"overwrite\",\n\t\"partitions\": {\n\t\t\"ds\": {\n\t\t\t\"value\": \"20230820\"\n\t\t}\n\t},\n\t\"event_time\": \"\",\n\t\"config\": {},\n\t\"offline_to_online\": true\n}",
"Fields": [
{
"Name": "user",
"Type": "int",
"Attributes": [
"Partition"
],
"Transform": [
{
"Type": "LLMEmbedding",
"LLMConfigId": 1,
"Input": [
{
"Name": "feature1",
"Type": "STRING",
"Modality": "TEXT"
}
]
}
]
}
],
"PublishTableScript": "from feature_store_py.fs_client import FeatureStoreClient\\nimport datetime\\nfrom feature_store_py.fs_datasource import MaxComputeDataSource\\nimport sys\\n\\ncur_day = args['dt']\\nprint('cur_day = ', cur_day)\\n\\naccess_key_id = o.account.access_id\\naccess_key_secret = o.account.secret_access_key\\nfs = FeatureStoreClient(access_key_id=access_key_id, access_key_secret=access_key_secret, region='cn-beijing')\\ncur_project_name = 'p1'\\nproject = fs.get_project(cur_project_name)\\n\\nfeature_view_name = 'user_fea'\\nbatch_feature_view = project.get_feature_view(feature_view_name)\\ntask = batch_feature_view.publish_table(partitions={'ds':cur_day}, mode='Overwrite')\\ntask.wait()\\ntask.print_summary()\\n",
"MockTableName": "item_table_mock_1"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.