# Path: pandas_gbq/exceptions.py
# class GenericGBQException(ValueError):
# class AccessDenied(ValueError):
# class ConversionError(GenericGBQException):
# class InvalidPrivateKeyFormat(ValueError):
# class PerformanceWarning(RuntimeWarning):
# 
# Path: pandas_gbq/features.py
# FEATURES = Features()


import decimal
import io
import db_dtypes
import pandas
import pyarrow.lib
import pandas_gbq.schema
from typing import Any, Callable, Dict, List, Optional
from google.cloud import bigquery
from pandas_gbq import exceptions
from pandas_gbq.features import FEATURES
            dataframe = dataframe.assign(**{column_name: cast_column})
    return dataframe


def load_parquet(
    client: bigquery.Client,
    dataframe: pandas.DataFrame,
    destination_table_ref: bigquery.TableReference,
    location: Optional[str],
    schema: Optional[Dict[str, Any]],
    billing_project: Optional[str] = None,
):
    job_config = bigquery.LoadJobConfig()
    job_config.write_disposition = "WRITE_APPEND"
    job_config.source_format = "PARQUET"

    if schema is not None:
        schema = pandas_gbq.schema.remove_policy_tags(schema)
        job_config.schema = pandas_gbq.schema.to_google_cloud_bigquery(schema)
        dataframe = cast_dataframe_for_parquet(dataframe, schema)

    try:
        client.load_table_from_dataframe(
            dataframe,
            destination_table_ref,
            job_config=job_config,
            location=location,
            project=billing_project,
        ).result()
    except pyarrow.lib.ArrowInvalid as exc:

# Path: pandas_gbq/exceptions.py
# class GenericGBQException(ValueError):
# class AccessDenied(ValueError):
# class ConversionError(GenericGBQException):
# class InvalidPrivateKeyFormat(ValueError):
# class PerformanceWarning(RuntimeWarning):
# 
# Path: pandas_gbq/features.py
# FEATURES = Features()


# Path: pandas_gbq/load.py
import decimal
import io
import db_dtypes
import pandas
import pyarrow.lib
import pandas_gbq.schema
from typing import Any, Callable, Dict, List, Optional
from google.cloud import bigquery
from pandas_gbq import exceptions
from pandas_gbq.features import FEATURES

            dataframe = dataframe.assign(**{column_name: cast_column})
    return dataframe


def load_parquet(
    client: bigquery.Client,
    dataframe: pandas.DataFrame,
    destination_table_ref: bigquery.TableReference,
    location: Optional[str],
    schema: Optional[Dict[str, Any]],
    billing_project: Optional[str] = None,
):
    job_config = bigquery.LoadJobConfig()
    job_config.write_disposition = "WRITE_APPEND"
    job_config.source_format = "PARQUET"

    if schema is not None:
        schema = pandas_gbq.schema.remove_policy_tags(schema)
        job_config.schema = pandas_gbq.schema.to_google_cloud_bigquery(schema)
        dataframe = cast_dataframe_for_parquet(dataframe, schema)

    try:
        client.load_table_from_dataframe(
            dataframe,
            destination_table_ref,
            job_config=job_config,
            location=location,
            project=billing_project,
        ).result()
    except pyarrow.lib.ArrowInvalid as exc:

        raise exceptions.ConversionError(