표 삭제
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
테이블을 삭제합니다.
더 살펴보기
이 코드 샘플이 포함된 자세한 문서는 다음을 참조하세요.
코드 샘플
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],[],[[["\u003cp\u003eThis page provides code samples demonstrating how to delete a table in Bigtable using various programming languages.\u003c/p\u003e\n"],["\u003cp\u003eThe code samples are available in C++, C#, Go, Java, Node.js, PHP, Python, and Ruby, each illustrating the deletion process within its respective language.\u003c/p\u003e\n"],["\u003cp\u003eTo use these code samples, it's necessary to set up Application Default Credentials for authentication, as outlined in the documentation.\u003c/p\u003e\n"],["\u003cp\u003eThe page references resources for installing Bigtable client libraries and explores other code samples in the Google Cloud sample browser.\u003c/p\u003e\n"]]],[],null,["Delete a table.\n\nExplore further\n\n\nFor detailed documentation that includes this code sample, see the following:\n\n- [C# hello world](/bigtable/docs/samples-c-sharp-hello)\n- [C++ hello world](/bigtable/docs/samples-cpp-hello)\n- [Go hello world](/bigtable/docs/samples-go-hello)\n- [Java hello world](/bigtable/docs/samples-java-hello-world)\n- [Node.js hello world](/bigtable/docs/samples-nodejs-hello)\n- [PHP hello world](/bigtable/docs/samples-php-hello)\n- [Python hello world](/bigtable/docs/samples-python-hello)\n- [Ruby hello world](/bigtable/docs/samples-ruby-hello)\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 google::cloud::Status status = table_admin.DeleteTable(table.table_name());\n if (!status.ok()) throw std::runtime_error(status.message());\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 // Clean up. Delete the table.\n Console.WriteLine($\"Delete table: {tableId}\");\n\n bigtableTableAdminClient.DeleteTable(name: tableName);\n if (!TableExist(bigtableTableAdminClient))\n {\n Console.WriteLine($\"Table: {tableId} deleted successfully\");\n }\n\nGo\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 log.Printf(\"Deleting the table\")\n if err = adminClient.DeleteTable(ctx, tableName); err != nil {\n \tlog.Fatalf(\"Could not delete table %s: %v\", tableName, err)\n }\n\n if err = adminClient.Close(); err != nil {\n \tlog.Fatalf(\"Could not close admin client: %v\", err)\n }\n\nJava\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 System.out.println(\"\\nDeleting table: \" + tableId);\n try {\n adminClient.deleteTable(tableId);\n System.out.printf(\"Table %s deleted successfully%n\", tableId);\n } catch (NotFoundException e) {\n System.err.println(\"Failed to delete a non-existent table: \" + e.getMessage());\n }\n\nNode.js\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 console.log('Delete the table');\n await table.delete();\n\nPHP\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 try {\n printf('Attempting to delete table %s.' . PHP_EOL, $tableId);\n $deleteTableRequest = (new DeleteTableRequest())\n -\u003esetName($tableName);\n $tableAdminClient-\u003edeleteTable($deleteTableRequest);\n printf('Deleted %s table.' . PHP_EOL, $tableId);\n } catch (ApiException $e) {\n if ($e-\u003egetStatus() === 'NOT_FOUND') {\n printf('Table %s does not exists' . PHP_EOL, $tableId);\n } else {\n throw $e;\n }\n }\n\nPython\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 print(\"Deleting the {} table.\".format(table_id))\n table.delete()\n\nRuby\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 puts \"Deleting the table #{table_id}\"\n # Call the admin API to delete the table given its full resource path.\n table_client.delete_table name: table_name\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)."]]