class_docstr: Load Data from S3 into a SQL Database.
  
  You need to provide a parser function that takes a filename as an input
  and returns an iterable of rows
  
  .. seealso::
      For more information on how to use this operator, take a look at the guide:
      :ref:`howto/operator:S3ToSqlOperator`
  
  :param schema: reference to a specific schema in SQL database
  :param table: reference to a specific table in SQL database
  :param s3_bucket: reference to a specific S3 bucket
  :param s3_key: reference to a specific S3 key
  :param sql_conn_id: reference to a specific SQL database. Must be of type DBApiHook
  :param sql_hook_params: Extra config params to be passed to the underlying hook.
      Should match the desired hook constructor params.
  :param aws_conn_id: reference to a specific S3 / AWS connection
  :param column_list: list of column names to use in the insert SQL.
  :param commit_every: The maximum number of rows to insert in one
      transaction. Set to `0` to insert all rows in one transaction.
  :param parser: parser function that takes a filepath as input and returns an iterable.
      e.g. to use a CSV parser that yields rows line-by-line, pass the following
      function:
  
      .. code-block:: python
  
          def parse_csv(filepath):
              import csv
  
              with open(filepath, newline="") as file:
                  yield from csv.reader(file)
class_docstr_tok: ["Load","Data","from","S3","into","a","SQL","Database",".","You","need","to","provide","a","parser","function","that","takes","a","filename","as","an","input","and","returns","an","iterable","of","rows","..","seealso",":",":","For","more","information","on","how","to","use","this","operator",",","take","a","look","at","the","guide",":",":","ref",":","`","howto\/operator",":","S3ToSqlOperator","`",":","param","schema",":","reference","to","a","specific","schema","in","SQL","database",":","param","table",":","reference","to","a","specific","table","in","SQL","database",":","param","s3_bucket",":","reference","to","a","specific","S3","bucket",":","param","s3_key",":","reference","to","a","specific","S3","key",":","param","sql_conn_id",":","reference","to","a","specific","SQL","database",".","Must","be","of","type","DBApiHook",":","param","sql_hook_params",":","Extra","config","params","to","be","passed","to","the","underlying","hook",".","Should","match","the","desired","hook","constructor","params",".",":","param","aws_conn_id",":","reference","to","a","specific","S3","\/","AWS","connection",":","param","column_list",":","list","of","column","names","to","use","in","the","insert","SQL",".",":","param","commit_every",":","The","maximum","number","of","rows","to","insert","in","one","transaction",".","Set","to","`","0","`","to","insert","all","rows","in","one","transaction",".",":","param","parser",":","parser","function","that","takes","a","filepath","as","input","and","returns","an","iterable",".","e.g",".","to","use","a","CSV","parser","that","yields","rows","line-by-line",",","pass","the","following","function",":","..","code-block",":",":","python","def","parse_csv","(","filepath",")",":","import","csv","with","open","(","filepath",",","newline=","''","''",")","as","file",":","yield","from","csv.reader","(","file",")"]
code: def __init__(
      self,
      *,
      s3_key: str,
      s3_bucket: str,
      table: str,
      parser: Callable[[str], Iterable[Iterable]],
      column_list: list[str] | None = None,
      commit_every: int = 1000,
      schema: str | None = None,
      sql_conn_id: str = "sql_default",
      sql_hook_params: dict | None = None,
      aws_conn_id: str = "aws_default",
      **kwargs,
  ) -> None:
      super().__init__(**kwargs)
      self.s3_bucket = s3_bucket
      self.s3_key = s3_key
      self.table = table
      self.schema = schema
      self.aws_conn_id = aws_conn_id
      self.sql_conn_id = sql_conn_id
      self.column_list = column_list
      self.commit_every = commit_every
      self.parser = parser
      self.sql_hook_params = sql_hook_params
  
file_path: airflow/airflow/providers/amazon/aws/transfers/s3_to_sql.py
imports: from __future__ import annotations
  from functools import cached_property
  from tempfile import NamedTemporaryFile
  from typing import TYPE_CHECKING, Callable, Iterable, Sequence
  from airflow.exceptions import AirflowException
  from airflow.hooks.base import BaseHook
  from airflow.models import BaseOperator
  from airflow.providers.amazon.aws.hooks.s3 import S3Hook
label_desc: Use image node_id 1 to create a new S3ToSqlOperator object from inherited base classes: BaseOperator with example: obj = S3ToSqlOperator()