Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Jika tampilan fitur Anda dikonfigurasi untuk menggunakan sinkronisasi data terjadwal, Anda dapat melewati waktu tunggu hingga operasi sinkronisasi terjadwal berikutnya dengan memulai sinkronisasi data secara manual.
Anda tidak dapat memicu sinkronisasi data secara manual jika tampilan fitur Anda dikonfigurasi
untuk menggunakan sinkronisasi data berkelanjutan. Untuk mengetahui informasi selengkapnya tentang jenis sinkronisasi data
yang didukung Vertex AI Feature Store dan cara mengonfigurasi jenis sinkronisasi
untuk tampilan fitur, lihat
Menyinkronkan data fitur dalam tampilan fitur.
Perhatikan bahwa untuk menyinkronkan data untuk seluruh toko online, Anda perlu menyinkronkan
data untuk semua tampilan fiturnya.
Sinkronisasi data mungkin memerlukan biaya terkait penggunaan resource BigQuery. Untuk mengetahui cara mengoptimalkan biaya sekaligus menetapkan jadwal sinkronisasi untuk tampilan fitur, lihat Mengoptimalkan biaya selama sinkronisasi.
Sebelum memulai
Lakukan autentikasi ke
Vertex AI, kecuali jika Anda telah melakukannya.
Untuk menggunakan contoh REST API di halaman ini dalam lingkungan pengembangan lokal, Anda menggunakan
kredensial yang Anda berikan ke gcloud CLI.
Menginstal Google Cloud CLI.
Setelah penginstalan,
lakukan inisialisasi Google Cloud CLI dengan menjalankan perintah berikut:
Gunakan contoh berikut untuk memulai sinkronisasi data di tampilan fitur yang dikonfigurasi untuk sinkronisasi data terjadwal secara manual.
Perhatikan bahwa hanya satu operasi sinkronisasi data yang dapat aktif pada satu waktu tertentu untuk
tampilan fitur. Jika Anda mencoba memulai sinkronisasi data secara manual saat sinkronisasi lain sedang berlangsung, operasi sinkronisasi baru hanya akan dimulai setelah operasi sinkronisasi yang sedang berlangsung berakhir.
REST
Untuk memulai sinkronisasi data secara manual di FeatureView, kirim permintaan POST dengan menggunakan metode featureViews.sync.
Sebelum menggunakan data permintaan mana pun, lakukan penggantian berikut:
LOCATION_ID: Region tempat toko online berada, seperti us-central1.
PROJECT_ID: Project ID Anda.
FEATUREONLINESTORE_NAME: Nama penyimpanan online yang berisi tampilan fitur.
FEATUREVIEW_NAME: Nama tampilan fitur tempat Anda ingin memulai sinkronisasi data secara manual.
Metode HTTP dan URL:
POST https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews/FEATUREVIEW_NAME:sync
Untuk mengirim permintaan Anda, pilih salah satu opsi berikut:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 UTC."],[],[],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)"]]