gpt4 book ai didi

Azure数据工厂slicestart格式错误

转载 作者:行者123 更新时间:2023-12-03 04:34:18 24 4
gpt4 key购买 nike

我一直在尝试在 SELECT 参数中设置 - slicestart 时间来收集最近更改的记录:

WHERE pv.CreatedAt >= \\'{0:yyyyMMdd-HH}\\'', Time.AddHours(SliceStart, 0))"

我得到了错误:

Database operation failed. Error message from database execution : ErrorCode=FailedDbOperation,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed with the following error: 'Conversion failed when converting date and/or time from character string.',Source=,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=A database operation failed with the following error: 'Conversion failed when converting date and/or time from character string.',Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=Conversion failed when converting date and/or time from character string.,Source=.Net SqlClient Data Provider,SqlErrorNumber=241,'.

最佳答案

我看到您正在使用 Time.AddHours() 函数,但传递 0 作为参数,这会将零小时添加到 SliceStart 值。如果您不打算增加 SliceStart 时间,请尝试以下操作:

"sqlReaderQuery": "$$Text.Format('select ... where pv.CreatedAt >=\'{0:yyyy-MM-dd}\', SliceStart)"

干杯,路易斯

关于Azure数据工厂slicestart格式错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29747604/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com