Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to convert epoch (Unix timestamp) into timestamp

How to convert epoch (Unix timestamp) into timestamp





I want to convert one column of my CSV file which is named as "EpochWithMicroSec", datatype -> epoch. I want to convert this column into 'Timestamp' and pass it to elasticsearch to visualize logs against time in kibana. Following attached is the error i am getting on using the 'ConvertRecord' processor and attaching the screenshots of properties i have configured.

    1 REPLY 1

    Re: How to convert epoch (Unix timestamp) into timestamp

    Super Collaborator

    Hi @shraddha srivastav,

    Apperently you try to convert string field into the time stamp.

    on your record schema at the source end you shoud define the data type as long instead of string for EpochWithMicroSec

    under the fields secton


    so that the conversion shall be able to perform from source to target.

    hope this helps!!

    Don't have an account?
    Coming from Hortonworks? Activate your account here