Skip to content

Commit

Permalink
simplify print regions
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed Oct 22, 2024
1 parent 039ad02 commit e3e4825
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
12 changes: 1 addition & 11 deletions samples/snippets/filters/filter_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START bigtable_filters_print]
import datetime

from google.cloud import bigtable
import google.cloud.bigtable.row_filters as row_filters

# Write your code here.
# [START_EXCLUDE]


# [START bigtable_filters_limit_row_sample]
def filter_limit_row_sample(project_id, instance_id, table_id):
Expand Down Expand Up @@ -340,9 +331,8 @@ def filter_composing_condition(project_id, instance_id, table_id):


# [END bigtable_filters_composing_condition]
# [END_EXCLUDE]


# [START bigtable_filters_print]
def print_row(row):
print("Reading data for {}:".format(row.row_key.decode("utf-8")))
for cf, cols in sorted(row.cells.items()):
Expand Down
1 change: 0 additions & 1 deletion samples/snippets/filters/filter_snippets_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ async def filter_composing_condition(project_id, instance_id, table_id):


# [END bigtable_filters_composing_condition_asyncio]
# [END_EXCLUDE]


def print_row(row):
Expand Down
12 changes: 1 addition & 11 deletions samples/snippets/reads/read_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START bigtable_reads_print]
from google.cloud import bigtable
import google.cloud.bigtable.row_filters as row_filters
from google.cloud.bigtable.row_set import RowSet

# Write your code here.
# [START_EXCLUDE]


# [START bigtable_reads_row]
def read_row(project_id, instance_id, table_id):
from google.cloud import bigtable
Expand Down Expand Up @@ -152,9 +143,8 @@ def read_filter(project_id, instance_id, table_id):


# [END bigtable_reads_filter]
# [END_EXCLUDE]


# [START bigtable_reads_print]
def print_row(row):
print("Reading data for {}:".format(row.row_key.decode("utf-8")))
for cf, cols in sorted(row.cells.items()):
Expand Down

0 comments on commit e3e4825

Please sign in to comment.