def get_query_parameters(config_parameters, date_time=datetime.datetime.now()):
    """ Merge the given parameters with the airflow macros. Enables macros (like '@_ds') in sql.

    Args:
      config_parameters: The user-specified list of parameters in the cell-body.
      date_time: The timestamp at which the parameters need to be evaluated. E.g. when the table
          is <project-id>.<dataset-id>.logs_%(_ds)s, the '_ds' evaluates to the current date-time.

    Returns:
      A list of query parameters that are in the format for the BQ service
    """
    merged_parameters = Query.merge_parameters(config_parameters, date_time=date_time,
                                               macros=False, types_and_values=True)
    # We're exposing a simpler schema format than the one actually required by BigQuery to make
    # magics easier. We need to convert between the two formats
    parsed_params = []
    for key, value in merged_parameters.items():
      parsed_params.append({
        'name': key,
        'parameterType': {
          'type': value['type']
        },
        'parameterValue': {
          'value': value['value']
        }
      })
    return parsed_params
Merge the given parameters with the airflow macros. Enables macros (like '@_ds') in sql.

    Args:
      config_parameters: The user-specified list of parameters in the cell-body.
      date_time: The timestamp at which the parameters need to be evaluated. E.g. when the table
          is <project-id>.<dataset-id>.logs_%(_ds)s, the '_ds' evaluates to the current date-time.

    Returns:
      A list of query parameters that are in the format for the BQ service