def create_valid_bigquery_field_name(field_name):
    """
    Clean up / prettify field names, make sure they match BigQuery naming conventions.
    
    Fields must:
        • contain only 
            -letters, 
            -numbers, and 
            -underscores, 
        • start with a 
            -letter or 
            -underscore, and
        • be at most 300 characters long

    :param key: JSON field name
    :return: cleaned up JSON field name
    """

    cleaned_up_field_name = ""

    # if char is alphanumeric (either letters or numbers), append char to our string
    for char in field_name:
        if char.isalnum():
            cleaned_up_field_name += char
        else:
            # otherwise, replace it with underscore
            cleaned_up_field_name += "_"

    # if field starts with digit, prepend it with underscore
    if cleaned_up_field_name[0].isdigit():
        cleaned_up_field_name = "_%s" % cleaned_up_field_name

    return cleaned_up_field_name[:300]