For everyone looking to write to a Data Table during editor time:
FDataTableEditorUtils::AddRow(UDataTable* DataTable, FName RowName)
shows what you need to do. The important lines are:
FDataTableEditorUtils::BroadcastPreChange(DataTable, EDataTableChangeInfo::RowList);
DataTable->Modify();
// Do your DataTable.AddRow(RowName, SomeNewRow);
FDataTableEditorUtils::BroadcastPostChange(DataTable, EDataTableChangeInfo::RowList);