SQL Bulk copy fails on SQL Server 2016. It may need to utilize dynamic sql instead of the IF statement because the query won't compile on older versions. Invalid column name 'graph_type'. To reproduce ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results