'How to create the file format in Snowflake?

I have below sample csv data with column delimiter as "|" and row delimiter is "|\n". I am receiving below error. How can I create the File Format?

Key|DimType|IntCo|Flg|InsertDateTime|UpdateDateTime|rwSts|
1|1||0|2021-12-05 03:16:54Z|2021-12-05 03:16:54Z|NDT|
2|2|QUNDTVRSWFBLVDE=|0|2021-12-05 03:16:54Z|2021-12-05 03:16:54Z|NDT|

Sample command used:

create or replace file format my_pipe_format_new
                                  type = csv
                                  skip_header = 1
                                  skip_blank_lines = true
                                  field_delimiter  = '|'
                                  record_delimiter  = '|\r\n'
                                  empty_field_as_null= true;

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source