Unfortunately, this is an issue which I've brought up to the dbt team but has yet to be resolved.
See: dbt-core issue #3990
That issue thread has more details into the underlying issues with the agate library's csv function, kwargs, etc.
In the interim, Jeremy was helpful in giving some options which make it possible to parse "|" or other delimiter options via the dbt-external-tables package which you can find more information about here:
See: dbt-external-tables issue #72
The file_format property, used as the input to create external table
statements, accepts a string of any length. So today, you could pass
it:
sources:
- name: my_external_source
tables:
- name: my_external_tbl
external:
location: "@my_stage"
file_format: "( type = csv field_delimiter = 'aa' record_delimiter = 'aabb' )"
The package macros will template this out as:
create or replace external table my_external_source.my_external_tbl
with location = '@my_stage'
file_format = ( type = csv field_delimiter = 'aa' record_delimiter = 'aabb' )
Hope that helps, I find the support for "|" delimited files to be relatively weak in general since they seem to be only used heavily in certain industries (financial) or locales.
Will update answer if anything the above changes but this is current information as of dbt-core v1.0 & dbt-external-tables v0.1.2