I am using this code for inserting batch:
$db = Yii::$app->db;
$sql = $db->queryBuilder->batchInsert('components', ["name"], $components);
$db->createCommand($sql . ' ON DUPLICATE KEY UPDATE')->execute();
And I am getting this error: SQLSTATE[42000]: Syntax error or access violation: 1064. What seems to be the problem?