Hi Zhu, Yueli YZ [NC],
Thank you for posting query in Microsoft Q&A Platform.
Why error:
In ListAllTable(Look up activity)
you are getting list of tables as array. You can check same in the output json of look up activity. So basically, you are getting table_name
and table_schema
columns.
Above array from lookup activity, you are passing it to ForEach
Activity to iterate over that table names. So for every iteration you get one item from array, and in the error you will have only table_name
and table_schema
columns.
But, in your below query, you are trying to take LastModifytime
property. Technically item() object not contains that property. Hence you are seeing the error.
select MAX(CAST(@item().LastModifytime as datetime2)) as NewWatermarkvalue from @{item().table_name}
Kindly consider checking below video of mine, where i explained how to pass output of one activity to another activity. That will help you to understand better.
How to read JSON output of one Activity in to another Activity in Azure Data Factory
Kindly correct your query according to avoid this error.
Hope this helps. Please let me know if any further queries.
Please consdier hitting Accept Answer
button. Accepted answers help community as well.