class_docstr: The Microsoft Channels Table implementation.
class_docstr_tok: ["The","Microsoft","Channels","Table","implementation","."]
docstr: Pulls data from the "GET /teams/{group_id}/channels" and "GET teams/{group_id}/channels/{channel_id}" Microsoft Graph API endpoints.
  
  Parameters
  ----------
  query : ast.Select
     Given SQL SELECT query.
  
  Returns
  -------
  pd.DataFrame
      Microsoft Teams Channels matching the query.
  
  Raises
  ------
  ValueError
      If the query contains an unsupported target (column).
  
  NotImplementedError
      If the query contains an unsupported condition.
docstr_tok: ["Pulls","data","from","the","``","GET","\/teams\/","{","group_id","}","\/channels","''","and","``","GET","teams\/","{","group_id","}","\/channels\/","{","channel_id","}","''","Microsoft","Graph","API","endpoints",".","Parameters","--","--","--","--","--","query",":","ast.Select","Given","SQL","SELECT","query",".","Returns","--","--","--","-","pd.DataFrame","Microsoft","Teams","Channels","matching","the","query",".","Raises","--","--","--","ValueError","If","the","query","contains","an","unsupported","target","(","column",")",".","NotImplementedError","If","the","query","contains","an","unsupported","condition","."]
code: def select(self, query: ast.Select) -> pd.DataFrame:
      """
      Pulls data from the "GET /teams/{group_id}/channels" and "GET teams/{group_id}/channels/{channel_id}" Microsoft Graph API endpoints.
  
      Parameters
      ----------
      query : ast.Select
         Given SQL SELECT query.
  
      Returns
      -------
      pd.DataFrame
          Microsoft Teams Channels matching the query.
  
      Raises
      ------
      ValueError
          If the query contains an unsupported target (column).
  
      NotImplementedError
          If the query contains an unsupported condition.
      """
  
      select_statement_parser = SELECTQueryParser(
          query, "channels", self.get_columns()
      )
  
      (
          selected_columns,
          where_conditions,
          order_by_conditions,
          result_limit,
      ) = select_statement_parser.parse_query()
  
      # only the = operator is supported for the id and teamId columns
      channel_id, team_id = None, None
      for op, arg1, arg2 in where_conditions:
          if arg1 == "id":
              if op == "=":
                  channel_id = arg2
              else:
                  raise NotImplementedError(
                      "Only '=' operator is supported for id column."
                  )
  
          if arg1 == "teamId":
              if op == "=":
                  team_id = arg2
              else:
                  raise NotImplementedError(
                      "Only '=' operator is supported for teamId column."
                  )
  
      channels_df = pd.json_normalize(
          self.get_channels(channel_id, team_id)
      )
  
      # if both channel_id and team_id are given, remove the id and teamId columns from the where conditions as they have already been evaluated in the API call (get_channels)
      if channel_id and team_id:
          where_conditions = [
              where_condition
              for where_condition in where_conditions
              if where_condition[1] not in ["id", "teamId"]
          ]
  
      select_statement_executor = SELECTQueryExecutor(
          channels_df,
          selected_columns,
          where_conditions,
          order_by_conditions,
          result_limit if query.limit else None,
      )
  
      channels_df = select_statement_executor.execute_query()
  
      return channels_df
  
imports: import pandas
  from typing import Text, List, Dict, Any
  from mindsdb.utilities import log
  from mindsdb_sql.parser import ast
  from mindsdb.integrations.libs.api_handler import APITable
  from mindsdb.integrations.handlers.ms_teams_handler.settings import ms_teams_handler_config
  from mindsdb.integrations.handlers.utilities.query_utilities.insert_query_utilities import INSERTQueryParser
  from mindsdb.integrations.handlers.utilities.query_utilities.select_query_utilities import SELECTQueryParser, SELECTQueryExecutor
label_desc: Use image node_id 1 for calling the ChannelsTable obj's underlying member method code with example usage: obj.select(query) and returns: channels_df