์˜จ๋ผ์ธ ์Šคํ† ์–ด ์—…๋ฐ์ดํŠธ

Bigtable ์˜จ๋ผ์ธ ์„œ๋น™์„ ์œ„ํ•ด ๋งŒ๋“  ์˜จ๋ผ์ธ ์Šคํ† ์–ด์˜ ์˜จ๋ผ์ธ ์„œ๋น™ ๊ตฌ์„ฑ์„ ์—…๋ฐ์ดํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด ์ตœ๋Œ€ ๋ฐ ์ตœ์†Œ ์„œ๋น™ ๋…ธ๋“œ ์ˆ˜๋ฅผ ์—…๋ฐ์ดํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์˜จ๋ผ์ธ ์Šคํ† ์–ด๋ฅผ ๋งŒ๋“ค๊ฑฐ๋‚˜ ์—…๋ฐ์ดํŠธํ•  ๋•Œ ์˜จ๋ผ์ธ ์Šคํ† ์–ด์— ๋ผ๋ฒจ ํ˜•์‹์œผ๋กœ ์‚ฌ์šฉ์ž ์ •์˜ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์˜จ๋ผ์ธ ์Šคํ† ์–ด์˜ ์‚ฌ์šฉ์ž ์ •์˜ ๋ผ๋ฒจ์„ ์—…๋ฐ์ดํŠธํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ์˜จ๋ผ์ธ ์Šคํ† ์–ด์˜ ๋ผ๋ฒจ ์—…๋ฐ์ดํŠธ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

์‹œ์ž‘ํ•˜๊ธฐ ์ „์—

์•„์ง Vertex AI์— ์ธ์ฆํ•˜์ง€ ์•Š์•˜๋‹ค๋ฉด ์ธ์ฆ์„ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

๋กœ์ปฌ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ์—์„œ ์ด ํŽ˜์ด์ง€์˜ REST API ์ƒ˜ํ”Œ์„ ์‚ฌ์šฉํ•˜๋ ค๋ฉด gcloud CLI์— ์ œ๊ณตํ•œ ์‚ฌ์šฉ์ž ์ธ์ฆ ์ •๋ณด๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

    After installing the Google Cloud CLI, initialize it by running the following command:

    gcloud init

    If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.

์ž์„ธํ•œ ๋‚ด์šฉ์€ Google Cloud ์ธ์ฆ ๋ฌธ์„œ์˜ REST ์‚ฌ์šฉ์„ ์œ„ํ•œ ์ธ์ฆ์„ ์ฐธ์กฐํ•˜์„ธ์š”.

์˜จ๋ผ์ธ ์Šคํ† ์–ด ์ธ์Šคํ„ด์Šค ์—…๋ฐ์ดํŠธ

๋‹ค์Œ ์ƒ˜ํ”Œ์„ ์‚ฌ์šฉํ•˜์—ฌ Bigtable ์˜จ๋ผ์ธ ์„œ๋น™์„ ์œ„ํ•ด ์ƒ์„ฑ๋œ ์˜จ๋ผ์ธ ์Šคํ† ์–ด ์ธ์Šคํ„ด์Šค์—์„œ ํ™•์žฅ ์˜ต์…˜์„ ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค.

REST

FeatureOnlineStore ๋ฆฌ์†Œ์Šค๋ฅผ ์—…๋ฐ์ดํŠธํ•˜๋ ค๋ฉด featureOnlineStores.patch ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ PATCH ์š”์ฒญ์„ ๋ณด๋ƒ…๋‹ˆ๋‹ค.

์š”์ฒญ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์ „์— ๋‹ค์Œ์„ ๋ฐ”๊ฟ‰๋‹ˆ๋‹ค.

  • LOCATION_ID: ์˜จ๋ผ์ธ ์ €์žฅ์†Œ๊ฐ€ ์žˆ๋Š” ๋ฆฌ์ „์ž…๋‹ˆ๋‹ค(์˜ˆ: us-central1).
  • PROJECT_ID: ํ”„๋กœ์ ํŠธ ID์ž…๋‹ˆ๋‹ค.
  • FEATUREONLINESTORE_NAME: ์—…๋ฐ์ดํŠธํ•˜๋ ค๋Š” ์˜จ๋ผ์ธ ์Šคํ† ์–ด์˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค.

HTTP ๋ฉ”์„œ๋“œ ๋ฐ URL:

PATCH https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME

JSON ์š”์ฒญ ๋ณธ๋ฌธ:

{
  "bigtable": {
    "auto_scaling": {
      "min_node_count": 1,
      "max_node_count": 3,
      "cpu_utilization_target": 50
    }
  }
}

์š”์ฒญ์„ ๋ณด๋‚ด๋ ค๋ฉด ๋‹ค์Œ ์˜ต์…˜ ์ค‘ ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.

curl

์š”์ฒญ ๋ณธ๋ฌธ์„ request.json ํŒŒ์ผ์— ์ €์žฅํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME"

PowerShell

์š”์ฒญ ๋ณธ๋ฌธ์„ request.json ํŒŒ์ผ์— ์ €์žฅํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME" | Select-Object -Expand Content

๋‹ค์Œ๊ณผ ๋น„์Šทํ•œ JSON ์‘๋‹ต์ด ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

{
  "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/operations/OPERATION_ID",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.aiplatform.v1.UpdateFeatureOnlineStoreOperationMetadata",
    "genericMetadata": {
      "createTime": "2023-09-18T17:49:23.847496Z",
      "updateTime": "2023-09-18T17:49:23.847496Z"
    }
  },
  "done": true,
  "response": {
    "@type": "type.googleapis.com/google.cloud.aiplatform.v1.FeatureView",
    "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME"
  }
}

๋‹ค์Œ ๋‹จ๊ณ„