diff --git a/api/api_fs_project.go b/api/api_fs_project.go index fc4b12b..075eb15 100644 --- a/api/api_fs_project.go +++ b/api/api_fs_project.go @@ -22,7 +22,7 @@ FsProjectApiService List Projects */ func (a *FsProjectApiService) ListProjects() (ListProjectsResponse, error) { request := paifeaturestore.ListProjectsRequest{} - request.SetName(a.client.cfg.projectName) + request.SetName(a.client.cfg.ProjectName) response, err := a.client.ListProjects(&a.client.instanceId, &request) var ( diff --git a/api/configuration.go b/api/configuration.go index a45035f..6a1ac57 100644 --- a/api/configuration.go +++ b/api/configuration.go @@ -6,7 +6,7 @@ type Configuration struct { regionId string AccessKeyId string AccessKeySecret string - projectName string + ProjectName string UserAgent string domain string } @@ -15,7 +15,7 @@ func NewConfiguration(regionId, accessKeyId, accessKeySecret, projectName string cfg := &Configuration{ UserAgent: "PAI-FeatureStore/1.0.0/go", regionId: regionId, - projectName: projectName, + ProjectName: projectName, AccessKeyId: accessKeyId, AccessKeySecret: accessKeySecret, } diff --git a/featurestore/feature_store_client.go b/featurestore/feature_store_client.go index 7197fb9..f630aa1 100644 --- a/featurestore/feature_store_client.go +++ b/featurestore/feature_store_client.go @@ -169,6 +169,9 @@ func (c *FeatureStoreClient) LoadProjectData() { } for _, p := range listProjectsResponse.Projects { + if p.ProjectName != c.client.GetConfig().ProjectName { + continue + } // get datasource getDataSourceResponse, err := c.client.DatasourceApi.DatasourceDatasourceIdGet(p.OnlineDatasourceId) if err != nil {