e5c0ff2865c1eac87fb7279b5d381c736d7a52e2,bigquery/cloud-client/query_params.py,,query_named_params,#Any#Any#,68

Before Change


        AND word_count >= @min_word_count
        ORDER BY word_count DESC;
        
    query_job = client.run_async_query(
        str(uuid.uuid4()),
        query,
        query_parameters=(
            bigquery.ScalarQueryParameter("corpus", "STRING", corpus),
            bigquery.ScalarQueryParameter(
                "min_word_count", "INT64", min_word_count)))
    query_job.use_legacy_sql = False

    query_job.begin()
    query_job.result()  // Wait for job to complete

    // Print the results.
    destination_table = query_job.destination
    destination_table.reload()
    for row in destination_table.fetch_data():
        print(row)

After Change


        AND word_count >= @min_word_count
        ORDER BY word_count DESC;
        
    query_params = [
        bigquery.ScalarQueryParameter("corpus", "STRING", corpus),
        bigquery.ScalarQueryParameter(
            "min_word_count", "INT64", min_word_count)
    ]
    job_config = bigquery.QueryJobConfig()
    job_config.query_parameters = query_params
    query_job = client.query(query, job_config=job_config)

    query_job.result()  // Wait for job to complete

    // Print the results.
    destination_table_ref = query_job.destination
    table = client.get_table(destination_table_ref)
    for row in client.list_rows(table):
        print(row)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 21

Instances


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: e5c0ff2865c1eac87fb7279b5d381c736d7a52e2
Time: 2017-10-31
Author: alixh@google.com
File Name: bigquery/cloud-client/query_params.py
Class Name:
Method Name: query_named_params


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: e5c0ff2865c1eac87fb7279b5d381c736d7a52e2
Time: 2017-10-31
Author: alixh@google.com
File Name: bigquery/cloud-client/query_params.py
Class Name:
Method Name: query_named_params


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: e5c0ff2865c1eac87fb7279b5d381c736d7a52e2
Time: 2017-10-31
Author: alixh@google.com
File Name: bigquery/cloud-client/query_params.py
Class Name:
Method Name: query_array_params


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: e5c0ff2865c1eac87fb7279b5d381c736d7a52e2
Time: 2017-10-31
Author: alixh@google.com
File Name: bigquery/cloud-client/query_params.py
Class Name:
Method Name: query_positional_params