What's the purpose of the cable connected on the top of the fin?
It is a Trailing Static or Trailing Cone used in test aircraft to measure free stream values. From Airdata Measurement and Calibration:


  By trailing a long tube behind the airplane, a nearly free-stream static pressure measurement can be taken. A perforated cone at the end of the tube acts as a drag device to keep the tube stable.




Image from NASA Airdata measurement and calibration

It is used in test aircraft. The image below shows the trailing cone attached to the 787 dreamliner (pictured at Paris airshow).



Image from flyingsquadron.com

This image shows the trailing cone assembly used in 787 dreamliner.



Image from airpigz.com

The device is specified by FAA and JAA as one of several methods that can be used to perform flight calibrations. According to FAA Advisory Circular 91-85:


  Where precision flight calibrations are used to quantify or verify altimetry system performance they may be accomplished by any of the ollowing methods. ...
  
  • Precision tracking radar in conjunction with pressure calibration of 
  atmosphere at test altitude. 
  
  • Trailing cone.
  
  • Pacer aircraft.
  
  • Any other method acceptable to the FAA or approving authority.