Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: formatting changes only

...

Documentation is based on original documentation at https://github.com/ogrodnek/csv-serde.

Code Block
languagesql
titleCreate table, specify CSV properties
createCREATE tableTABLE my_table(a string, b string, ...)
ROW rowFORMAT format serdeSERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH with serdepropertiesSERDEPROPERTIES (
   "separatorChar" = "\t",
   "quoteChar"     = "'",
   "escapeChar"    = "\\"
  )   
STORED stored as textfile
AS TEXTFILE;
Code Block
titleDefault separator, quote, and escape characters if unspecified
DEFAULT_ESCAPE_CHARACTER \
DEFAULT_QUOTE_CHARACTER  "
DEFAULT_SEPARATOR        ,

...