Repository: apache/airflow
File: providers/common/sql/src/airflow/providers/common/sql/operators/sql.py (Python)

Code before:
        except ValueError:
            raise AirflowException(
                f"Unexpected query return result '{query_result}' type '{type(query_result)}'"
            )

        self.skip_all_except(context["ti"], self.follow_branch)


class SQLInsertRowsOperator(BaseSQLOperator):
    """
    Insert rows (e.g. a collection of tuples) into a database table directly from an XCom or Python data structure.

    :param table: the name of the table in which the rows will be inserted (templated).
    :param conn_id: the connection ID used to connect to the database
    :param schema: (optional) the name of schema in which the table is defined
    :param database: name of database (e.g. schema) which overwrite the defined one in connection
    :param columns: (optional) specify a list of columns being used for the insert when passing a list of
        dictionaries.
    :param ignore_columns: (optional) specify a list of columns being ignored for the insert.  If no columns
        where specified, the columns will be resolved dynamically from the metadata.
    :param rows: the rows to insert into the table. Rows can be a list of tuples or a list of dictionaries.
        When a list of dictionaries is provided, the column names are inferred from the dictionary keys and
        will be matched with the column names, ignored columns will be filtered out.
    :param rows_processor: (optional) A callable applied once per batch of rows before insertion.
        It receives the full list of rows and the task context, and must return a list of rows compatible with
        the underlying hook's.
    :param preoperator: sql statement or list of statements to be executed prior to loading the data. (templated)
    :param postoperator: sql statement or list of statements to be executed after loading the data. (templated)
    :param insert_args: (optional) dictionary of additional arguments passed to the underlying hook's
        `insert_rows` method. This allows you to configure options such as `replace`, `executemany`,
        `fast_executemany`, and `autocommit`.

    .. seealso::
        For more information on how to use this operator, take a look at the guide:
        :ref:`howto/operator:SQLInsertRowsOperator`
    """

    template_fields: Sequence[str] = (
        "table_name",
        "conn_id",
        "schema",
        "database",
        "_columns",
        "ignored_columns",
        "preoperator",
        "postoperator",
        "insert_args",
    )
    template_ext: Sequence[str] = (".sql",)
    template_fields_renderers = {"preoperator": "sql"}


Review comment (suggestion):
```suggestion
        the underlying hook.
```

or

```suggestion
        the underlying hook's `insert_rows` method.
```

Code after:
        except ValueError:
            raise AirflowException(
                f"Unexpected query return result '{query_result}' type '{type(query_result)}'"
            )

        self.skip_all_except(context["ti"], self.follow_branch)


class SQLInsertRowsOperator(BaseSQLOperator):
    """
    Insert rows (e.g. a collection of tuples) into a database table directly from an XCom or Python data structure.

    :param table: the name of the table in which the rows will be inserted (templated).
    :param conn_id: the connection ID used to connect to the database
    :param schema: (optional) the name of schema in which the table is defined
    :param database: name of database (e.g. schema) which overwrite the defined one in connection
    :param columns: (optional) specify a list of columns being used for the insert when passing a list of
        dictionaries.
    :param ignore_columns: (optional) specify a list of columns being ignored for the insert.  If no columns
        where specified, the columns will be resolved dynamically from the metadata.
    :param rows: the rows to insert into the table. Rows can be a list of tuples or a list of dictionaries.
        When a list of dictionaries is provided, the column names are inferred from the dictionary keys and
        will be matched with the column names, ignored columns will be filtered out.
    :param rows_processor: (optional) A callable applied once per batch of rows before insertion.
        It receives the full list of rows and the task context, and must return a list of rows compatible with
        the underlying hook.
    :param preoperator: sql statement or list of statements to be executed prior to loading the data. (templated)
    :param postoperator: sql statement or list of statements to be executed after loading the data. (templated)
    :param insert_args: (optional) dictionary of additional arguments passed to the underlying hook's
        `insert_rows` method. This allows you to configure options such as `replace`, `executemany`,
        `fast_executemany`, and `autocommit`.

    .. seealso::
        For more information on how to use this operator, take a look at the guide:
        :ref:`howto/operator:SQLInsertRowsOperator`
    """

    template_fields: Sequence[str] = (
        "table_name",
        "conn_id",
        "schema",
        "database",
        "_columns",
        "ignored_columns",
        "preoperator",
        "postoperator",
        "insert_args",
    )
    template_ext: Sequence[str] = (".sql",)
    template_fields_renderers = {"preoperator": "sql"}