Excluir linhas com um prefixo
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Excluir linhas com chaves de linha que correspondam a um determinado prefixo.
Exemplo de código
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],[],[[["\u003cp\u003eThis code demonstrates how to delete rows in a Bigtable table that have row keys starting with a specified prefix.\u003c/p\u003e\n"],["\u003cp\u003eThe code uses the \u003ccode\u003eDropRowRange\u003c/code\u003e function from the Bigtable Admin API to delete rows by a row key prefix.\u003c/p\u003e\n"],["\u003cp\u003eThe C++ code example uses the Bigtable client library, which can be found in the documentation.\u003c/p\u003e\n"],["\u003cp\u003eTo interact with Bigtable, proper authentication through Application Default Credentials is required.\u003c/p\u003e\n"]]],[],null,["Delete rows with row keys matching a given prefix.\n\nCode sample \n\nC++\n\n\nTo learn how to install and use the client library for Bigtable, see\n[Bigtable client libraries](/bigtable/docs/reference/libraries).\n\n\nTo authenticate to Bigtable, set up Application Default Credentials.\nFor more information, see\n\n[Set up authentication for a local development environment](/docs/authentication/set-up-adc-local-dev-environment).\n\n namespace cbt = ::google::cloud::bigtable;\n namespace cbta = ::google::cloud::bigtable_admin;\n using ::google::cloud::Status;\n [](cbta::BigtableTableAdminClient admin, std::string const& project_id,\n std::string const& instance_id, std::string const& table_id,\n std::string const& prefix) {\n std::string table_name = cbt::TableName(project_id, instance_id, table_id);\n\n google::bigtable::admin::v2::DropRowRangeRequest r;\n r.set_name(table_name);\n r.set_row_key_prefix(prefix);\n\n Status status = admin.DropRowRange(std::move(r));\n if (!status.ok()) throw std::runtime_error(status.message());\n std::cout \u003c\u003c \"All rows starting with \" \u003c\u003c prefix\n \u003c\u003c \" successfully deleted\\n\";\n }\n\nWhat's next\n\n\nTo search and filter code samples for other Google Cloud products, see the\n[Google Cloud sample browser](/docs/samples?product=bigtable)."]]