BigQuery - document loader, load() function throws error
Labels: name: area: doc loader, name: auto:bug

### System Info

BigQuery table is not able to load. Here is the code:

```python


from langchain.document_loaders import BigQueryLoader

BASE_QUERY = """
SELECT  * FROM arindam-2banerjee-0525-pimy.sf_transport.bikeshare_trips
"""

loader = BigQueryLoader(BASE_QUERY)

loader.load()

```


Error message:

```

---------------------------------------------------------------------------
NotFound                                  Traceback (most recent call last)
[<ipython-input-24-4ebe0f70b252>](https://localhost:8080/#) in <cell line: 9>()
      7 loader = BigQueryLoader(BASE_QUERY)
      8 
----> 9 loader.load()

9 frames
[~/.local/lib/python3.10/site-packages/langchain/document_loaders/bigquery.py](https://localhost:8080/#) in load(self)
     59 
     60         bq_client = bigquery.Client(credentials=self.credentials, project=self.project)
---> 61         query_result = bq_client.query(self.query).result()
     62         docs: List[Document] = []
     63 

[/usr/local/lib/python3.10/dist-packages/google/cloud/bigquery/client.py](https://localhost:8080/#) in query(self, query, job_config, job_id, job_id_prefix, location, project, retry, timeout, job_retry, api_method)
   3401             )
   3402         elif api_method == enums.QueryApiMethod.INSERT:
-> 3403             return _job_helpers.query_jobs_insert(
   3404                 self,
   3405                 query,

[/usr/local/lib/python3.10/dist-packages/google/cloud/bigquery/_job_helpers.py](https://localhost:8080/#) in query_jobs_insert(client, query, job_config, job_id, job_id_prefix, location, project, retry, timeout, job_retry)
    112             return query_job
    113 
--> 114     future = do_query()
    115     # The future might be in a failed state now, but if it's
    116     # unrecoverable, we'll find out when we ask for it's result, at which

[/usr/local/lib/python3.10/dist-packages/google/cloud/bigquery/_job_helpers.py](https://localhost:8080/#) in do_query()
     89 
     90         try:
---> 91             query_job._begin(retry=retry, timeout=timeout)
     92         except core_exceptions.Conflict as create_exc:
     93             # The thought is if someone is providing their own job IDs and they get

[/usr/local/lib/python3.10/dist-packages/google/cloud/bigquery/job/query.py](https://localhost:8080/#) in _begin(self, client, retry, timeout)
   1308 
   1309         try:
-> 1310             super(QueryJob, self)._begin(client=client, retry=retry, timeout=timeout)
   1311         except exceptions.GoogleAPICallError as exc:
   1312             exc.message = _EXCEPTION_FOOTER_TEMPLATE.format(

[/usr/local/lib/python3.10/dist-packages/google/cloud/bigquery/job/base.py](https://localhost:8080/#) in _begin(self, client, retry, timeout)
    691         # job has an ID.
    692         span_attributes = {"path": path}
--> 693         api_response = client._call_api(
    694             retry,
    695             span_name="BigQuery.job.begin",

[/usr/local/lib/python3.10/dist-packages/google/cloud/bigquery/client.py](https://localhost:8080/#) in _call_api(self, retry, span_name, span_attributes, job_ref, headers, **kwargs)
    811                 name=span_name, attributes=span_attributes, client=self, job_ref=job_ref
    812             ):
--> 813                 return call()
    814 
    815         return call()

[/usr/local/lib/python3.10/dist-packages/google/api_core/retry.py](https://localhost:8080/#) in retry_wrapped_func(*args, **kwargs)
    347                 self._initial, self._maximum, multiplier=self._multiplier
    348             )
--> 349             return retry_target(
    350                 target,
    351                 self._predicate,

[/usr/local/lib/python3.10/dist-packages/google/api_core/retry.py](https://localhost:8080/#) in retry_target(target, predicate, sleep_generator, timeout, on_error, **kwargs)
    189     for sleep in sleep_generator:
    190         try:
--> 191             return target()
    192 
    193         # pylint: disable=broad-except

[/usr/local/lib/python3.10/dist-packages/google/cloud/_http/__init__.py](https://localhost:8080/#) in api_request(self, method, path, query_params, data, content_type, headers, api_base_url, api_version, expect_json, _target_object, timeout, extra_api_info)
    492 
    493         if not 200 <= response.status_code < 300:
--> 494             raise exceptions.from_http_response(response)
    495 
    496         if expect_json and response.content:

NotFound: 404 POST https://bigquery.googleapis.com/bigquery/v2/projects//jobs?prettyPrint=false: Request couldn't be served.

Location: None
Job ID: 77604d22-bf1b-4dca-b6f7-ab553ac6aab8
```

### Who can help?

_No response_

### Information

- [ ] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [X] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

The code mentioned above.




### Expected behavior

Load a BigQuery query with one document per row.