The present invention provides a compound of formula (I), or a pharmaceutically acceptable salt, tautomer, prodrug, solvate, metabolite, polymorph, analog or derivative thereof, compound of formula (I) And a method of treating or preventing a disease in which BTK plays a role.본 발명은 BTK의 활성을 조절하는 화학식 (I)의 화합물, 또는 이의 약제학적으로 허용되는 염, 호변이성질체, 프로드러그, 용매화물, 대사물질, 다형체, 유사체 또는 유도체, 화학식 (I)의 화합물을 포함하는 약제학적 조성물, 및 BTK가 역할을 하는 질환의 치료 또는 예방 방법에 관한 것이다: