Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Create an external file format object

Create an External file format object.

CREATE EXTERNAL FILE FORMAT file_format_name 
WITH ( 
    FORMAT_TYPE = PARQUET 
     [ , DATA_COMPRESSION = { 
        'org.apache.hadoop.io.compress.SnappyCodec' 
      | 'org.apache.hadoop.io.compress.GzipCodec'      } 
    ]); 
 
--Create an external file format for ORC files. 
CREATE EXTERNAL FILE FORMAT file_format_name 
WITH ( 
    FORMAT_TYPE = ORC 
     [ , DATA_COMPRESSION = { 
        'org.apache.hadoop.io.compress.SnappyCodec' 
      | 'org.apache.hadoop.io.compress.DefaultCodec'      } 
    ]); 
 
--Create an external file format for RCFILE. 
CREATE EXTERNAL FILE FORMAT file_format_name 
WITH ( 
    FORMAT_TYPE = RCFILE, 
    SERDE_METHOD = { 
        'org.apache.hadoop.hive.serde2.columnar.LazyBinaryColumnarSerDe' 
      | 'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe' 
    } 
    [ , DATA_COMPRESSION = 'org.apache.hadoop.io.compress.DefaultCodec' ]); 
 
--Create an external file format for DELIMITED TEXT files. 
CREATE EXTERNAL FILE FORMAT file_format_name 
WITH ( 
    FORMAT_TYPE = DELIMITEDTEXT 
    [ , FORMAT_OPTIONS ( [ ,...n  ] ) ] 
    [ , DATA_COMPRESSION = { 
           'org.apache.hadoop.io.compress.GzipCodec' 
         | 'org.apache.hadoop.io.compress.DefaultCodec' 
        } 
     ]); 
 
::= 
{ 
    FIELD_TERMINATOR = field_terminator 
    | STRING_DELIMITER = string_delimiter 
    | DATE_FORMAT = datetime_format 
    | USE_TYPE_DEFAULT = { TRUE | FALSE } 
}  


I hope that the functionality of the above attribute is clear to you now. Now you can use this code in your application If you have further question, just drop a line below and I will try to answer you as soon as possible.
Last but not least, connect with me on Twitter, Facebook , LinkedIn and Google+ for technical updates and articles news. We won’t spam or share your email address as we respect your privacy.
 


This post first appeared on Drop IF Exists In SQL SERVER 2016, please read the originial post: here

Share the post

Create an external file format object

×

Subscribe to Drop If Exists In Sql Server 2016

Get updates delivered right to your inbox!

Thank you for your subscription

×