class_docstr: Airtable connector to retrieving record data.
class_docstr_tok: ["Airtable","connector","to","retrieving","record","data","."]
docstr: make connection to database
docstr_tok: ["make","connection","to","database"]
code: def _init_connection(self, config: BaseConnectorConfig):
      """
      make connection to database
      """
      config = config.dict()
      url = f"{self._root_url}{config['base_id']}/{config['table']}"
      response = requests.head(
          url=url,
          headers={"Authorization": f"Bearer {config['api_key']}"},
      )
      if response.status_code == 200:
          self.logger.log(
              """
                  Connected to Airtable.
              """
          )
      else:
          raise InvalidRequestError(
              f"""Failed to connect to Airtable. 
                      Status code: {response.status_code}, 
                      message: {response.text}"""
          )
  
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 2 for calling the AirtableConnector obj's underlying member method code with example usage: obj._init_connection(config) without return types