@@ -0,0 +1,1409 @@
+package events.setup;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.FileReader;%0Aimport java.io.FileWriter;%0Aimport java.io.IOException;%0Aimport java.time.LocalDateTime;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport org.json.JSONObject;%0A%0Apublic class UpdateUserEventsJson %7B%0A%0A  public static void main(String%5B%5D args) %7B%0A    try %7B%0A      String timestamp = LocalDateTime.now().minusDays(1).toString();%0A      String filename = %22src/main/resources/user_events.json%22;%0A      updateFields(timestamp, filename);%0A      filename = %22src/main/resources/user_events_some_invalid.json%22;%0A      updateFields(timestamp, filename);%0A    %7D catch (IOException e) %7B%0A      e.printStackTrace();%0A    %7D%0A  %7D%0A%0A  private static void updateFields(String timestamp, String filename) throws IOException %7B%0A    List%3CString%3E newLines = new ArrayList%3C%3E();%0A    try (BufferedReader file = new BufferedReader(new FileReader(filename))) %7B%0A      String line = file.readLine();%0A      String field = %22eventTime%22;%0A      while (line != null) %7B%0A        JSONObject object = new JSONObject(line);%0A        object.put(field, timestamp);%0A        newLines.add(object.toString());%0A        line = file.readLine();%0A      %7D%0A    %7D%0A    try (FileWriter file = new FileWriter(filename)) %7B%0A      for (String event : newLines) %7B%0A        file.write(event);%0A        file.write(%22%5Cn%22);%0A      %7D%0A      System.out.println(%22Successfully updated json file!%22);%0A    %7D%0A  %7D%0A%7D%0A

fix (samples) Import user events BQ, missing UpdateUserEventsJson.java (#494)