class_docstr: Airtable connector to retrieving record data.
class_docstr_tok: ["Airtable","connector","to","retrieving","record","data","."]
docstr: Fetches data from the Airtable server via API and converts it to a DataFrame.
docstr_tok: ["Fetches","data","from","the","Airtable","server","via","API","and","converts","it","to","a","DataFrame","."]
code: def _fetch_data(self):
      """
      Fetches data from the Airtable server via API and converts it to a DataFrame.
      """
  
      params = {"pageSize": 100, "offset": "0"}
  
      if self._config.where is not None:
          params["filterByFormula"] = self._build_formula()
  
      data = []
      while True:
          response = self._request_api(params=params)
  
          if response.status_code != 200:
              raise InvalidRequestError(
                  f"Failed to connect to Airtable. "
                  f"Status code: {response.status_code}, "
                  f"message: {response.text}"
              )
  
          res = response.json()
          records = res.get("records", [])
          data.extend(
              {"id": record["id"], **record["fields"]}
              for record in records
          )
  
          if len(records) < 100 or "offset" not in res:
              break
  
          params["offset"] = res["offset"]
  
      return pd.DataFrame(data)
  
imports: from .base import AirtableConnectorConfig, BaseConnector, BaseConnectorConfig
  from typing import Union, Optional
  import requests
  import pandas
  import os
  from ..helpers.path import find_project_root
  import time
  import hashlib
  from ..exceptions import InvalidRequestError
  from functools import cache, cached_property
label_desc: Use image node_id 10 for calling the AirtableConnector obj's underlying member method code with example usage: obj._fetch_data() and returns: pd