Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove unused code snippets #1139

Merged
merged 2 commits into from
Feb 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions docs/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,46 +756,6 @@ def test_client_query_total_rows(client, capsys):
assert "Got 100 rows." in out


def test_manage_job(client):
# TODO(b/199162556): delete after migrating docs
sql = """
SELECT corpus
FROM `bigquery-public-data.samples.shakespeare`
GROUP BY corpus;
"""
location = "us"
job = client.query(sql, location=location)
job_id = job.job_id

# [START bigquery_cancel_job]
# TODO(developer): Uncomment the lines below and replace with your values.
# from google.cloud import bigquery
# client = bigquery.Client()
# job_id = 'bq-job-123x456-123y123z123c' # replace with your job ID
# location = 'us' # replace with your location

job = client.cancel_job(job_id, location=location)
# [END bigquery_cancel_job]

# [START bigquery_get_job]
# TODO(developer): Uncomment the lines below and replace with your values.
# from google.cloud import bigquery
# client = bigquery.Client()
# job_id = 'bq-job-123x456-123y123z123c' # replace with your job ID
# location = 'us' # replace with your location

job = client.get_job(job_id, location=location) # API request

# Print selected job properties
print("Details for job {} running in {}:".format(job_id, location))
print(
"\tType: {}\n\tState: {}\n\tCreated: {}".format(
job.job_type, job.state, job.created
)
)
# [END bigquery_get_job]


def test_query_external_gcs_permanent_table(client, to_delete):
dataset_id = "query_external_gcs_{}".format(_millis())
project = client.project
Expand Down