i have been trying to add timestamp to my dataframes and persist them in to hive.But here is the problem, As i cannot use timestamp as a data type in my 0.13 version hive, i want to convert current_timestamp()in timestamp data type to string so that i can load it in to my hive table.
Here is my timestamp column,
[2017-01-12 12:55:55.278] [2017-01-12 12:55:55.278] [2017-01-12 12:55:55.278] [2017-01-12 12:55:55.278] [2017-01-12 12:55:55.278]
i have tried this but with no luck:
val ts = current_timestamp() val df:SimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd") val date:String = df.format(ts.toLong)
Any way to convert the timestamp to string in scala??
With an aim to bring a vibration in the technology world, TechVibrate brings you a unique web interface that is highly dynamic with dedicated sub-sections loaded with versatile information. This portal reflects true amalgamation of information with random news, technology updates, tips and tricks, apps, how to articles along with a wide variety of deals and coupons. In a single line, this portal offers something for everyone and everything for someone looking for specific information online with the freshest and the best information. TechVibrate brings you information about latest gadgets, Android and iOS apps, TV Shows, soaps and operas, and even your local specific programs. With a few clicks of mouse you can know about what’s happening around you with the finest information about deals and offers. You can get an easy-to-grab coupon code section, where you can avail a range of coupons from the shops and online outlets in your region. It is just not another coupon portal; rather it offers you a sense of freedom with information, education, tips, tricks and news as well as online earning potential.
You can access quick updates about the latest announcements and information through a smart integration of Social Media. Access the quickest updates online, by following our facebook, twitter and Google+ pages or subscribing to our news updates! You can also learn about how to make easy money online with their tested and proven methods. Get the best deals on dance classes, tuition classes, flower shops and online random shops on TechVibrate today! Also equip yourself with the best of knowledge and information!