Skip to content

Commit

Permalink
fix(ingest/redshift): replace r'\n' with '\n' to avoid token error re…
Browse files Browse the repository at this point in the history
…dshift serverless… (#11111)
  • Loading branch information
AndreasHegerNuritas committed Aug 8, 2024
1 parent e08412e commit a4a887c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,11 @@ def get_alter_table_commands(
yield AlterTableRow(
transaction_id=row[field_names.index("transaction_id")],
session_id=session_id,
query_text=row[field_names.index("query_text")],
# See https://docs.aws.amazon.com/redshift/latest/dg/r_STL_QUERYTEXT.html
# for why we need to replace the \n with a newline.
query_text=row[field_names.index("query_text")].replace(
r"\n", "\n"
),
start_time=row[field_names.index("start_time")],
)
rows = cursor.fetchmany()

0 comments on commit a4a887c

Please sign in to comment.