DEV Community

Mike Houngbadji
Mike Houngbadji

Posted on • Updated on

Apache Spark SQL: CTAS USING CSV with specific delimiter

To use CTAS (Create table as Select) in Apache Spark with a specific delimiter using the OPTION syntax:

CREATE TABLE sample_table
USING CSV
OPTIONS ('delimiter'='|')
AS
SELECT ....
Enter fullscreen mode Exit fullscreen mode

SparkSQL Documentation

PS:
I wrote this to also help myself retrieve the solution faster.

Top comments (0)