Closed dataders closed 3 years ago
Hi @swanderz :
We need to enclose the quote with another quote character ''
The below code should work :
insert into "dbtsynapseci"."dbt_external_tables_integration_tests_synapse"."data_people" ( id, first_name, last_name, email, ip_address, created_at, is_active ) SELECT '60','Anthia','Tolland','atolland1n@hibu.com','124.60.13.101','2016-02-06 14:38:37','True' UNION ALL SELECT '61','Annamarie','Pipworth','apipworth1o@ftc.gov','53.219.191.107','2017-06-13 08:29:04','True' UNION ALL SELECT '62','Price','O\''Gready','pogready1p@theatlantic.com','131.188.180.57','2016-09-28 08:44:38','' UNION ALL SELECT '63','Sergei','Cicero','scicero1q@telegraph.co.uk','100.97.16.84','2017-10-02 15:58:45',''
Solution:
Replace the below code :
'{{row[column].replace("'","''") if row[column]}}'
Resolved with the PR: Update seed.sql #31
This csv fails to materialize because of line 63 where
last_name=O'Gready
with the following error:Here's the query. I escaped the inner
'
because it also broke the GH syntax highlighting 😝 I'm sure the other adapters have a way to escape the quote delimiters within strings.