POST https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews/FEATUREVIEW_NAME:sync
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Start a data sync\n\nIf your feature view is configured to use scheduled data sync, you can\noptionally skip the wait until the next scheduled sync operation by manually\ninitiating the data sync.\n\nYou can't manually trigger a data sync if your feature view is configured\nto use continuous data sync. For more information about the types of data sync\nthat Vertex AI Feature Store supports and how to configure the sync type\nfor a feature view, see\n[Sync feature data in a feature view](/vertex-ai/docs/featurestore/latest/create-featureview#sync_featuredata).\n\nNote that to sync the data for the entire online store, you need to sync the\ndata for all of its feature views.\n\nData sync might involve costs for BigQuery resource usage. For\ninformation about how to optimize costs while setting the sync schedule for a\nfeature view, see [Optimize costs during sync](/vertex-ai/docs/featurestore/latest/create-featureview#sync_optimize_costs).\n\nBefore you begin\n----------------\n\n\nto\nVertex AI, unless you've done so already.\n\n\nTo use the REST API samples on this page in a local development environment, you use the\ncredentials you provide to the gcloud CLI.\n\n1. [Install](/sdk/docs/install) the Google Cloud CLI. After installation, [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command: \n\n```bash\ngcloud init\n```\n2. If you're using an external identity provider (IdP), you must first [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n\nFor more information, see\n[Authenticate for using REST](/docs/authentication/rest)\nin the Google Cloud authentication documentation.\n\nManually start a data sync\n--------------------------\n\nUse the following sample to manually start the data sync in a feature view\nconfigured for scheduled data sync.\n\nNote that only one data sync operation can be active at any point of time for\na feature view. If you try to manually start the data sync while another sync is\nin progress, then the new sync operation starts only after the ongoing sync\noperation ends.\n**Caution:** You can't trigger the data sync if your feature view is configured for [continuous data sync](/vertex-ai/docs/featurestore/latest/create-featureview#sync_featuredata). If your feature view is configured for continuous data sync, then the feature data is refreshed whenever the feature data in the BigQuery data source is updated. \n\n### REST\n\n\nTo manually start a data sync in a\n[`FeatureView`](/vertex-ai/docs/reference/rest/v1/projects.locations.featureOnlineStores.featureViews#resource:-featureView),\nsend a `POST` request by using the\n[featureViews.sync](/vertex-ai/docs/reference/rest/v1/projects.locations.featureOnlineStores.featureViews/sync)\nmethod.\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: Region where the online store is located, such as `us-central1`.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eFEATUREONLINESTORE_NAME\u003c/var\u003e: The name of the online store containing the feature view.\n- \u003cvar translate=\"no\"\u003eFEATUREVIEW_NAME\u003c/var\u003e: The name of the feature view where you want to manually start the data sync.\n\n\nHTTP method and URL:\n\n```\nPOST https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews/FEATUREVIEW_NAME:sync\n```\n\nTo send your request, choose one of these options: \n\n#### curl\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\ncurl -X POST \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d \"\" \\\n \"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews/FEATUREVIEW_NAME:sync\"\n```\n\n#### PowerShell\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nExecute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -Uri \"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews/FEATUREVIEW_NAME:sync\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"featureViewSync\": \"projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews/FEATUREVIEW_NAME/featureViewSyncs/OPERATION_ID\"\n}\n```\n\n\u003cbr /\u003e\n\nWhat's next\n-----------\n\n- Learn how to [view a list of all data sync operations executed for a feature view](/vertex-ai/docs/featurestore/latest/list-data-syncs).\n\n- Learn how to [update a feature view](/vertex-ai/docs/featurestore/latest/update-featureview)"]]