class_docstr: Moves data from S3 to Hive.
  
  The operator downloads a file from S3, stores the file locally
  before loading it into a Hive table.
  
  If the ``create`` or ``recreate`` arguments are set to ``True``,
  a ``CREATE TABLE`` and ``DROP TABLE`` statements are generated.
  Hive data types are inferred from the cursor's metadata from.
  
  Note that the table generated in Hive uses ``STORED AS textfile``
  which isn't the most efficient serialization format. If a
  large amount of data is loaded and/or if the tables gets
  queried considerably, you may want to use this operator only to
  stage the data into a temporary table before loading it into its
  final destination using a ``HiveOperator``.
  
  :param s3_key: The key to be retrieved from S3. (templated)
  :param field_dict: A dictionary of the fields name in the file
      as keys and their Hive types as values
  :param hive_table: target Hive table, use dot notation to target a
      specific database. (templated)
  :param delimiter: field delimiter in the file
  :param create: whether to create the table if it doesn't exist
  :param recreate: whether to drop and recreate the table at every
      execution
  :param partition: target partition as a dict of partition columns
      and values. (templated)
  :param headers: whether the file contains column names on the first
      line
  :param check_headers: whether the column names on the first line should be
      checked against the keys of field_dict
  :param wildcard_match: whether the s3_key should be interpreted as a Unix
      wildcard pattern
  :param aws_conn_id: source s3 connection
  :param verify: Whether or not to verify SSL certificates for S3 connection.
      By default SSL certificates are verified.
      You can provide the following values:
  
      - ``False``: do not validate SSL certificates. SSL will still be used
               (unless use_ssl is False), but SSL certificates will not be
               verified.
      - ``path/to/cert/bundle.pem``: A filename of the CA cert bundle to uses.
               You can specify this argument if you want to use a different
               CA cert bundle than the one used by botocore.
  :param hive_cli_conn_id: Reference to the
      :ref:`Hive CLI connection id <howto/connection:hive_cli>`.
  :param input_compressed: Boolean to determine if file decompression is
      required to process headers
  :param tblproperties: TBLPROPERTIES of the hive table being created
  :param select_expression: S3 Select expression
class_docstr_tok: ["Moves","data","from","S3","to","Hive",".","The","operator","downloads","a","file","from","S3",",","stores","the","file","locally","before","loading","it","into","a","Hive","table",".","If","the","``","create","``","or","``","recreate","``","arguments","are","set","to","``","True","``",",","a","``","CREATE","TABLE","``","and","``","DROP","TABLE","``","statements","are","generated",".","Hive","data","types","are","inferred","from","the","cursor","'s","metadata","from",".","Note","that","the","table","generated","in","Hive","uses","``","STORED","AS","textfile","``","which","is","n't","the","most","efficient","serialization","format",".","If","a","large","amount","of","data","is","loaded","and\/or","if","the","tables","gets","queried","considerably",",","you","may","want","to","use","this","operator","only","to","stage","the","data","into","a","temporary","table","before","loading","it","into","its","final","destination","using","a","``","HiveOperator","``",".",":","param","s3_key",":","The","key","to","be","retrieved","from","S3",".","(","templated",")",":","param","field_dict",":","A","dictionary","of","the","fields","name","in","the","file","as","keys","and","their","Hive","types","as","values",":","param","hive_table",":","target","Hive","table",",","use","dot","notation","to","target","a","specific","database",".","(","templated",")",":","param","delimiter",":","field","delimiter","in","the","file",":","param","create",":","whether","to","create","the","table","if","it","does","n't","exist",":","param","recreate",":","whether","to","drop","and","recreate","the","table","at","every","execution",":","param","partition",":","target","partition","as","a","dict","of","partition","columns","and","values",".","(","templated",")",":","param","headers",":","whether","the","file","contains","column","names","on","the","first","line",":","param","check_headers",":","whether","the","column","names","on","the","first","line","should","be","checked","against","the","keys","of","field_dict",":","param","wildcard_match",":","whether","the","s3_key","should","be","interpreted","as","a","Unix","wildcard","pattern",":","param","aws_conn_id",":","source","s3","connection",":","param","verify",":","Whether","or","not","to","verify","SSL","certificates","for","S3","connection",".","By","default","SSL","certificates","are","verified",".","You","can","provide","the","following","values",":","-","``","False","``",":","do","not","validate","SSL","certificates",".","SSL","will","still","be","used","(","unless","use_ssl","is","False",")",",","but","SSL","certificates","will","not","be","verified",".","-","``","path\/to\/cert\/bundle.pem","``",":","A","filename","of","the","CA","cert","bundle","to","uses",".","You","can","specify","this","argument","if","you","want","to","use","a","different","CA","cert","bundle","than","the","one","used","by","botocore",".",":","param","hive_cli_conn_id",":","Reference","to","the",":","ref",":","`","Hive","CLI","connection","id","<","howto\/connection",":","hive_cli",">","`",".",":","param","input_compressed",":","Boolean","to","determine","if","file","decompression","is","required","to","process","headers",":","param","tblproperties",":","TBLPROPERTIES","of","the","hive","table","being","created",":","param","select_expression",":","S3","Select","expression"]
code: def _get_top_row_as_list(self, file_name):
      with open(file_name) as file:
          header_line = file.readline().strip()
          return header_line.split(self.delimiter)
  
file_path: airflow/airflow/providers/apache/hive/transfers/s3_to_hive.py
imports: from __future__ import annotations
  import bz2
  import gzip
  import os
  import tempfile
  from tempfile import NamedTemporaryFile, TemporaryDirectory
  from typing import TYPE_CHECKING, Any, Sequence
  from airflow.exceptions import AirflowException
  from airflow.models import BaseOperator
  from airflow.providers.amazon.aws.hooks.s3 import S3Hook
  from airflow.providers.apache.hive.hooks.hive import HiveCliHook
  from airflow.utils.compression import uncompress_file
label_desc: Use image node_id 3 for calling the S3ToHiveOperator obj's underlying member method code with example usage: obj._get_top_row_as_list(file_name) and returns: header_line