Macro for sanitizing CSV

I have CSV with one column:

tradehour
2022-11-21 18:00:00
2022-11-21 19:00:00
2022-11-21 20:00:00
2022-11-21 21:00:00

I’ll use this to iterate over hours to do backfill with backfill model.

When I run dbt seed I get:

12:32:20  Database Error in seed frame-report-backfill-hrs (seeds/frame-report-backfill-hrs.csv)
12:32:20    001003 (42000): SQL compilation error:
12:32:20    syntax error line 1 at position 50 unexpected '-'.

Even If I put those records in single or double quotations - I get same error.
What would be proper way of sanitizing this data so it can be properly loaded as single column table?
How can I run some macro to do that automatically?
I would like to just copy paste those timestamps , run macro and have CSV sanitized.
I don’t need full solutions just few pointers.
Thanks!

You should be able to specify that these are datetimes in your dbt_project.yml: https://docs.getdbt.com/faqs/seeds/seed-datatypes

if not, you could fall back to creating it as a string column and then transform it further in a dbt staging model, but that feels like it should be unnecessary

Note: @joellabes (dbt Labs) originally posted this reply in Slack. It might not have transferred perfectly.