code: @Override
      public int getNbLines() throws TechnicalException {
          String sqlRequest = "";
          try {
              final Path file = Paths.get(dataInPath + scenarioName + ".sql");
              sqlRequest = new String(Files.readAllBytes(file), Charset.forName(Constants.DEFAULT_ENDODING));
              sqlSanitized4readOnly(sqlRequest);
          } catch (final IOException e) {
              throw new TechnicalException(Messages.getMessage(TechnicalException.TECHNICAL_ERROR_MESSAGE) + e.getMessage(), e);
          }
          try (Connection connection = getConnection();
                  Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
                  ResultSet rs = statement.executeQuery(sqlRequest);) {
              return rs.last() ? rs.getRow() + 1 : 0;
          } catch (final SQLException e) {
              logger.error("error DBDataProvider.getNbLines()", e);
              return 0;
          }
      }
docs: {@inheritDoc}
  
  @throws TechnicalException
  is thrown if you have a technical error (IOException on .sql file) in NoraUi.