Clarification - Creating CSV file

Hi,

I am new to Dremio.

Currently I am using the CREATE TABLE statement to create a ‘txt’ file on S3 bucket with comma (,) as field delimiter.

Following is the sample format of the our SQL statement:

CREATE TABLE .<TABLE_NAME> STORE AS (type => ‘text’, fieldDelimiter => ‘,’, lineDelimiter => ’
', quote=> ‘"’) AS
SELECT * FROM “source data”

Clarification:

  • This statement creates the output file named as ‘0_0_0.txt’ inside a new S3 folder (named as <TABLE_NAME> given in the CREATE TABLE statement).
    -> Is there any option to create the file name as “<TABLE_NAME>_0_0_0”?
    -> Is there any option to specify the extension as “csv” on CREATE TABLE statement.
  • Please share documentation/links for STORE AS clause.
    Thanks,
    Srikanth

@srikanth_n

  • Currently Dremio auto generates the file names
  • By default if you do not specify any parameters, the format is Parquet and is recommended for best performance compared to CSV

Hi Balaji,

What parameters would we use if we wanted to create a CSV file? Instead of parquet.

Thanks
Wayne

@waynekoepcke Currently CTAS only creates PARQUET files

OK thanks for the clarification Balaji.