Skip to content

Commit

Permalink
add escape quotes in spark read csv
Browse files Browse the repository at this point in the history
  • Loading branch information
Hsankesara committed Jun 10, 2024
1 parent 4b6f56d commit 561f8db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions radarpipeline/io/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ def _read_variable_data_files(
df = self.spark.read.load(
file_dict[column_hash],
format="csv",
quote="\"",
escape="\"",
header=True,
schema=schema.get_schema_by_hash(column_hash),
enforceSchema="false",
Expand All @@ -230,6 +232,8 @@ def _read_variable_data_files(
df = self.spark.read.load(
file_dict[column_hash],
format="csv",
quote="\"",
escape="\"",
header=True,
inferSchema="true",
encoding=constants.ENCODING,
Expand Down

0 comments on commit 561f8db

Please sign in to comment.