class_docstr: Executes an SQL statement in a given SQL connection and sends the results to Slack API as file.
  
  .. seealso::
      For more information on how to use this operator, take a look at the guide:
      :ref:`howto/operator:SqlToSlackApiFileOperator`
  
  :param sql: The SQL query to be executed
  :param sql_conn_id: reference to a specific DB-API Connection.
  :param slack_conn_id: :ref:`Slack API Connection <howto/connection:slack>`.
  :param slack_filename: Filename for display in slack.
      Should contain supported extension which referenced to ``SUPPORTED_FILE_FORMATS``.
      It is also possible to set compression in extension:
      ``filename.csv.gzip``, ``filename.json.zip``, etc.
  :param sql_hook_params: Extra config params to be passed to the underlying hook.
      Should match the desired hook constructor params.
  :param parameters: The parameters to pass to the SQL query.
  :param slack_channels: Comma-separated list of channel names or IDs where the file will be shared.
       If omitting this parameter, then file will send to workspace.
  :param slack_initial_comment: The message text introducing the file in specified ``slack_channels``.
  :param slack_title: Title of file.
  :param slack_base_url: A string representing the Slack API base URL. Optional
  :param df_kwargs: Keyword arguments forwarded to ``pandas.DataFrame.to_{format}()`` method.
code: def __init__(
      self,
      *,
      sql: str,
      sql_conn_id: str,
      sql_hook_params: dict | None = None,
      parameters: list | tuple | Mapping[str, Any] | None = None,
      slack_conn_id: str = SlackHook.default_conn_name,
      slack_filename: str,
      slack_channels: str | Sequence[str] | None = None,
      slack_initial_comment: str | None = None,
      slack_title: str | None = None,
      slack_base_url: str | None = None,
      df_kwargs: dict | None = None,
      **kwargs,
  ):
      super().__init__(
          sql=sql,
          sql_conn_id=sql_conn_id,
          sql_hook_params=sql_hook_params,
          parameters=parameters,
          **kwargs,
      )
      self.slack_conn_id = slack_conn_id
      self.slack_filename = slack_filename
      self.slack_channels = slack_channels
      self.slack_initial_comment = slack_initial_comment
      self.slack_title = slack_title
      self.slack_base_url = slack_base_url
      self.df_kwargs = df_kwargs or {}
  
file_path: airflow/airflow/providers/slack/transfers/sql_to_slack.py
imports: from __future__ import annotations
  import warnings
  from tempfile import NamedTemporaryFile
  from typing import TYPE_CHECKING, Any, Mapping, Sequence
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.providers.slack.hooks.slack import SlackHook
  from airflow.providers.slack.transfers.base_sql_to_slack import BaseSqlToSlackOperator
  from airflow.providers.slack.transfers.sql_to_slack_webhook import SqlToSlackWebhookOperator
  from airflow.providers.slack.utils import parse_filename
label_desc: Use image node_id 1 to create a new SqlToSlackApiFileOperator object from inherited base classes: BaseSqlToSlackOperator with example: obj = SqlToSlackApiFileOperator()