CData Python Connector for Google BigQuery

Build 23.0.8839

データの変更

"execute()" を呼び出してセッションで個別にコマンドを実行できます。

テーブルオブジェクトの取得

このメソッドに提供されるクエリは、マップされたクラスの関連するTable オブジェクトを使用して構築されます。このTable オブジェクトは、以下のように、マップされたクラスのメタデータフィールドから取得されます。

[publicdata].[samples].github_nested_table = [publicdata].[samples].github_nested.metadata.tables["[publicdata].[samples].github_nested"]

テーブルオブジェクトが取得されると、次の方法で書き込み操作が実行されます。クエリは"commit()" を呼び出すことなく即座に実行されます。

Insert

次の例では、テーブルに新しいレコードを追加します。

session.execute([publicdata].[samples].github_nested_table.insert(), {"actor.attributes.email": "EntityFramework", "repository.name": "CoreCLR"})

Update

次の例では、テーブル内の既存のレコードを変更します。

session.execute([publicdata].[samples].github_nested_table.update().where([publicdata].[samples].github_nested_table.c.Id == "1").values(actor.attributes.email="EntityFramework", repository.name="CoreCLR"))

Delete

次の例では、テーブルから既存のレコードを削除します。

session.execute([publicdata].[samples].github_nested_table.delete().where([publicdata].[samples].github_nested_table.c.Id == "1"))

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839