You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently came across a bug/issue where noticed that max_results parameter is not working which we generally use to set/get max total no. of records from query job. Below mentioned is sample code which returns all records from table (no effect of max_results parameter)
import typing
from typing import Union
from google.auth.credentials import AnonymousCredentials
from google.api_core.client_options import ClientOptions
if typing.TYPE_CHECKING:
from google.cloud.bigquery import LoadJob, CopyJob, ExtractJob, QueryJob
# Construct a BigQuery client object.
client = bigquery.Client(
"dummy-local",
client_options=ClientOptions(api_endpoint="http://bigquery:9050"),
credentials=AnonymousCredentials(),
)
query_job = client.query("""
SELECT id,percent,name,bq_decrypt_data(name) as dname
FROM `dummy-local.dataset1.table_csv`
""") # Make an API request.
result = query_job.results(max_results=1)
for row in result:
print(str(row))
print(create_job())
Could you help to fix it please.
Best Regards,
Onkar Kulkarni
The text was updated successfully, but these errors were encountered:
Hello Goccy,
Recently came across a bug/issue where noticed that max_results parameter is not working which we generally use to set/get max total no. of records from query job. Below mentioned is sample code which returns all records from table (no effect of max_results parameter)
import typing
from typing import Union
from google.auth.credentials import AnonymousCredentials
from google.api_core.client_options import ClientOptions
if typing.TYPE_CHECKING:
from google.cloud.bigquery import LoadJob, CopyJob, ExtractJob, QueryJob
def create_job() -> "Union[LoadJob, CopyJob, ExtractJob, QueryJob]":
# [START bigquery_create_job]
from google.cloud import bigquery
print(create_job())
Could you help to fix it please.
Best Regards,
Onkar Kulkarni
The text was updated successfully, but these errors were encountered: