מחיקת עמודות באמצעות mutate

מחיקת עמודות בשורה באמצעות mutate.

דוגמת קוד

C++

מידע על התקנת ספריית הלקוח של Bigtable ושימוש בה מופיע במאמר ספריות הלקוח של Bigtable.

כדי לבצע אימות ב-Bigtable, צריך להגדיר את Application Default Credentials. מידע נוסף זמין במאמר הגדרת אימות לסביבת פיתוח מקומית.

namespace cbt = ::google::cloud::bigtable;
[](cbt::Table table, std::string const& key,
   std::vector<std::pair<std::string, std::string>> const& columns) {
  cbt::SingleRowMutation mutation(key);
  for (auto const& c : columns) {
    mutation.emplace_back(cbt::DeleteFromColumn(c.first, c.second));
  }
  google::cloud::Status status = table.Apply(std::move(mutation));
  if (!status.ok()) throw std::runtime_error(status.message());
  std::cout << "Columns successfully deleted from row\n";
}

המאמרים הבאים

כדי לחפש ולסנן דוגמאות קוד למוצרים אחרים של Google Cloud , אפשר להיעזר בGoogle Cloud דפדפן לדוגמה.