Search code examples
azure-sql-databaseazure-blob-storageorcazure-synapse

Converting CSV to ORC File Format


I have a file in BLOB storage which contains comma separated value. How to Convert this .txt file to ORC format.I am loading this data into Azure SQL DW and not using Java. Please share your thought on this one.

Data

A,B,C,
D,E,F,

File need to be converted to .txt to ORC format in BLOB storage.


Solution

  • So something like:

    CREATE EXTERNAL TABLE test_orc
    WITH   
        (   
            LOCATION = '/TEST/a.orc',  
            DATA_SOURCE = SIMPLE,  
            FILE_FORMAT = TRANS_HEADER_ORC  
        )  
    AS SELECT * FROM test