[Q] <title>adding records from EF to Clickhouse, causing error when async_insert = 1 and wait_for_async_insert = 1 switched on the server
Question
Why would I get the following error on the clickhouse DB when inserting records in the db when teh 2 options are switched on to allow for the db to cache the inerts.
<Error> AsynchronousInsertQueue: Failed parsing for query 'INSERT INTO xxxxxx.Sighting (DataWarehouseSightingId, ActionTaken, Colour, Comments, Date, FullImageIsAvailable, FullImageIsThumb, HitStatus, Id, ImageConfigurationId, IsVerified, Latitude, Longitude, Make, Model, PlateImageIsAvailable, ReceivedDate, SightingDate, SightingNoActionReason, SiteLocation, SiteName, SubjectType, SubjectValue, VerifiedValue) FORMAT Values' with query id a6d1efc3-aece-43b0-b77c-54b268ad1764. DB::Exception: Substitution p0 is not set
some data redacted, when the 2 switches are off the system adds but not at high performance
Regards Terence
Hi Terence,
~~Does the same error appear if both options are off? I assume that if you have wait_for_async_insert=0 then you may just not see the error because the server returns 200 straight away and doesn't wait until results~~
Edit: realised I haven't read this issue fully - this question has already been answered
Do you by chance have a minimal reproducible example - a piece of code with a small table and single insert? If the difference in behavior is only triggered by flags, I would say it may be an upstream issue (issue in ClickHouse itself), but it's worth looking deeper