Before discovering meaningful knowledge from big data systems, it is first necessary to build a data-gathering infrastructure. Among many feasible data sources, wireless sensor networks (WSNs) are rich big data sources: a large amount of data is generated by various sensor nodes in large-scale networks. However, unlike typical wireless networks, WSNs have serious deficiencies in terms of data reliability and communication owing to the limited capabilities of the nodes. Moreover, a considerable amount of sensed data are of no interest, meaningless, and redundant when a large number of sensor nodes is densely deployed. Many studies address the existing problems and propose methods to overcome the limitations when constructing big data systems with WSN. However, a published paper that provides deep insight into this research area remains lacking. To address this gap in the literature, we present a comprehensive survey that investigates state-of-the-art research work on introducing WSN in big data systems. Potential applications and technical challenges of networks and infrastructure are presented and explained in accordance with the research areas and objectives. Finally, open issues are presented to discuss promising directions for further research.