locked
Problem while reading Timestamp value in JSON using Azure Data Factory RRS feed

  • Question

  • Hi All,

    while reading data from REST API using JSON through Azure Data Factory the timestamp column which has values like this <time>2020-03-01T00:13:59-07:00</time>. ADF treats this as integer and reads it as 1452859829000.I have tried to do the conversion in Copy activity code like this, but it doesn't work.

    toTimestamp(seconds(toInteger(toString(byName('['time']')))),'yyyy-MM-dd HH:mm:ss')
    (toTimestamp('['time']', 'yyyy-MM-dd HH:mm:ss.SSS')

    Any ideas or suggestion is highly appreciated.

    Thanks

    Saturday, March 14, 2020 8:08 AM

All replies

  • Any suggestions please!!
    Monday, March 16, 2020 4:54 AM
  • Hi there,

    Are you using Data Flow ? Where are you defining this conversion?

    Monday, March 16, 2020 7:21 AM
  • In Copy Activity I am applying this conversion in Code.
    Monday, March 16, 2020 7:59 AM
  • Can you please share a screenshot of the same? Please mask any personal details from the screenshot.
    Monday, March 16, 2020 10:10 AM
  • 

    Monday, March 16, 2020 12:10 PM
  • The preview in ADF source shows the modified column value as Integer and the below is the source value of REST API data. Not sure how to make the convert this.
    Monday, March 16, 2020 12:11 PM
  • Any suggestions please!!
    Tuesday, March 17, 2020 7:41 AM
  • Did anybody come across this problem?
    Monday, April 6, 2020 5:23 AM
  • Hi there,

    For a deeper investigation and immediate assistance on this issue, if you have a support plan you may file a support ticket, else could you please send an email to AzCommunity@Microsoft.com with the below details, so that we can create a one-time-free support ticket for you to work closely on this matter. 

    Thread URL: https://social.msdn.microsoft.com/Forums/en-US/1f879cb0-3d92-4406-b1f3-7757ed6c6407/problem-while-reading-timestamp-value-in-json-using-azure-data-factory?forum=AzureDataFactory
    Subscription ID: <your subscription ID>

    Please keep the subject as "attn:chmishr".

    Please let me know once you have done the same

    Wednesday, April 8, 2020 12:54 PM
  • Hi there,

    Just wanted to check - Did you get a chance to create the support ticket?
    Wednesday, April 22, 2020 11:25 AM
  • Yeah, since the REST API is in XML format, I got the response that there's no way ADF can read data in XML format till now.
    Friday, April 24, 2020 5:55 AM