技能 azure-data-tables-java
📦

azure-data-tables-java

安全

Azure Table Storage アプリケーションを Java で構築

大規模な構造化 NoSQL データの保存が必要ですか?このスキルは、適切な認証と効率的なクエリパターンを使用して、Azure Tables SDK for Java によるテーブルストレージソリューションの実装をサポートします。

支持: Claude Codex Code(CC)
🥉 74 青铜
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“azure-data-tables-java”。 エンティティを作成して競合エラーを処理

预期结果:

TableEntity entity = new TableEntity("products", "laptop-001").addProperty("Name", "Laptop").addProperty("Price", 999.99);
try {
tableClient.createEntity(entity);
} catch (TableServiceException e) {
if (e.getResponse().getStatusCode() == 409) {
System.out.println("Entity already exists - use upsert instead");
}
}

正在使用“azure-data-tables-java”。 フィルターとプロジェクションを使用したクエリ

预期结果:

ListEntitiesOptions options = new ListEntitiesOptions()
.setFilter("PartitionKey eq 'electronics' and Price gt 100")
.setSelect("Name", "Price")
.setTop(10);
for (TableEntity entity : tableClient.listEntities(options, null, null)) {
System.out.printf("%s: $%.2f%n", entity.getProperty("Name"), entity.getProperty("Price"));
}

安全审计

安全
v1 • 2/24/2026

This skill is safe for publication. All static analysis findings are false positives. The external_commands detections are Java code examples in markdown format, not shell execution. URL references are environment variable documentation examples, not hardcoded endpoints. The cryptographic and system reconnaissance flags are incorrect pattern matches on documentation text and getter method names.

1
已扫描文件
340
分析行数
0
发现项
1
审计总数
未发现安全问题
审计者: claude

质量评分

38
架构
100
可维护性
87
内容
50
社区
100
安全
91
规范符合性

你能构建什么

アプリケーション状態ストレージ

ユーザーセッション、アプリケーション設定、または機能フラグを、高速なパーティションベースのルックアップで保存

IoT テレメトリデータ

デバイス ID をパーティションキー、タイムスタンプを行キーとして使用してセンサーデータを収集およびクエリ

製品カタログ管理

カテゴリベースのパーティションと効率的な価格/在庫状況クエリで製品在庫を管理

试试这些提示

テーブルクライアントの初期化
Create a TableServiceClient using connection string authentication, then create a table called 'inventory' if it does not exist.
CRUD エンティティ操作
Show me how to create a new entity with partition key 'products', row key 'laptop-001', and properties Name, Price, and Quantity. Then retrieve and update the price.
フィルター処理されたクエリ
Query all entities where PartitionKey equals 'electronics' and Price is greater than 100, returning only Name and Price properties with a limit of 10 results.
バッチトランザクション
Create a batch transaction that inserts three entities with the same partition key 'batch' and row keys 'row1', 'row2', and 'row3' atomically.

最佳实践

  • クエリが均等に分散され、ホットスポットを回避するようにパーティションキーを設計
  • 最適なパフォーマンスのために、クエリでは常に PartitionKey でフィルター
  • 同一パーティションキーを共有するエンティティへのアトミック更新にはバッチトランザクションを使用

避免

  • タイムスタンプや連続値をパーティションキーとして使用すると、負荷分布が不均一になる
  • PartitionKey フィルターなしでクエリを実行すると、テーブル全体のスキャンが発生し、パフォーマンスが低下
  • サイズ制限を超えるエンティティを保存すると失敗する - Storage では 1MB 未満、Cosmos では 2MB 未満に抑える

常见问题

Azure Table Storage と Cosmos DB Table API の違いは何ですか?
Azure Table Storage は 1MB のエンティティ制限を備えた費用効率の良いキーバリューストレージを提供します。Cosmos DB Table API は、より高いコストでグローバル分散、低レイテンシ、2MB のエンティティ制限を提供します。
適切なパーティションキーを選択するにはどうすればよいですか?
クエリを均等に分散する基数の高いプロパティを選択します。一般的なパターンには、アクセスポターンに基づいてユーザー ID、デバイス ID、またはカテゴリコードが含まれます。
エンティティのプロパティを 1 つだけ更新できますか?
はい、TableEntityUpdateMode.MERGE を使用して updateEntity で指定されたプロパティのみを更新するか、REPLACE を使用してエンティティ全体を上書きできます。
どのような認証方法がサポートされていますか?
接続文字列、共有キー、SAS トークン、および DefaultAzureCredential(Table Storage のみ、Cosmos DB Table API は除く)。
バッチトランザクションに含めることができるエンティティの数はどれくらいですか?
バッチ操作では、トランザクションあたり最大 100 個のエンティティをサポートし、すべて同じパーティションキーを共有し、合計ペイロードサイズが 4MB 以内である必要があります。
409 競合エラーとは何を意味しますか?
409 ステータスコードはエンティティが既に存在することを示します。createEntity の代わりに upsertEntity を使用するか、例外を処理して updateEntity で再試行します。

开发者详情

文件结构

📄 SKILL.md