- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
就上下文而言,我目前有一个数据工厂 v2 管道,其中包含一个调用复制事件的 ForEach Activity。 复制事件只是将数据从 FTP 服务器复制到 Blob 存储容器。
这是管道 json 文件:
{
"name": "pipeline1",
"properties": {
"activities": [
{
"name": "ForEach1",
"type": "ForEach",
"typeProperties": {
"items": {
"value": "@pipeline().parameters.InputParams",
"type": "Expression"
},
"isSequential": true,
"activities": [
{
"name": "Copy1",
"type": "Copy",
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false
},
"typeProperties": {
"source": {
"type": "FileSystemSource",
"recursive": true
},
"sink": {
"type": "BlobSink"
},
"enableStaging": false,
"cloudDataMovementUnits": 0
},
"inputs": [
{
"referenceName": "FtpDataset",
"type": "DatasetReference",
"parameters": {
"FtpFileName": "@item().FtpFileName",
"FtpFolderPath": "@item().FtpFolderPath"
}
}
],
"outputs": [
{
"referenceName": "BlobDataset",
"type": "DatasetReference",
"parameters": {
"BlobFileName": "@item().BlobFileName",
"BlobFolderPath": "@item().BlobFolderPath"
}
}
]
}
]
}
}
],
"parameters": {
"InputParams": {
"type": "Array",
"defaultValue": [
{
"FtpFolderPath": "/Folder1/",
"FtpFileName": "@concat('File_',formatDateTime(utcnow(), 'yyyyMMdd'), '.txt')",
"BlobFolderPath": "blobfolderpath",
"BlobFileName": "blobfile1"
},
{
"FtpFolderPath": "/Folder2/",
"FtpFileName": "@concat('File_',formatDateTime(utcnow(), 'yyyyMMdd'), '.txt')",
"BlobFolderPath": "blobfolderpath",
"BlobFileName": "blobfile2"
}
]
}
}
},
"type": "Microsoft.DataFactory/factories/pipelines"
}
我遇到的问题是,在指定管道参数时,我似乎无法像为 blob 存储数据集指定文件夹路径那样使用系统变量和函数。这样做的结果是 formatDateTime(utcnow(), 'yyyyMMdd')
不会被解释为函数调用,而是具有值 formatDateTime(utcnow(), 'yyyyMMdd') 的实际字符串
.
为了解决这个问题,我猜测我应该使用触发器来执行管道,并将触发器的执行时间作为参数传递给管道,例如 trigger().startTime
但这是唯一的方法吗?我只是在管道的 JSON 中做错了什么吗?
最佳答案
这应该有效:File_@{formatDateTime(utcnow(), 'yyyyMMdd')}
或者复杂的路径:
rootfolder/subfolder/@{formatDateTime(utcnow(),'yyyy')}/@{formatDateTime(utcnow(),'MM')}/@{formatDateTime(utcnow(),'dd')}/@{formatDateTime(utcnow(),'HH')}
关于使用 utcnow() 作为管道参数的 Azure 数据工厂 v2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50986738/
我有一个通过 REST 调用 WEB API 的客户端应用程序。出于管理原因,我想节省相应步骤的时间,看起来像这样: var requestStartTime = DateTime.UtcNow; r
我需要将一些代码从静态调用 DateTime.UtcNow 升级为调用基本上返回 DateTimeOffset.UtcNow 的时间提供程序服务。要进一步将此 DateTimeOffset 实例转换为
EF 查询中的 DateTime 函数是否由 SQL Server 计算,就像查询表达式之外的 DateTime 函数由运行 IL 的计算机计算一样? 我有一个包含 SalesOrders 的应用程序
我几年前写过这个系统,现在不写任何 C#,所以这对我来说有点生疏。我使用下面显示的代码写出一条新记录。由于某些原因,@TStamp 有时没有正确写出(SQL Server 12): 可以看出,我有时会
我无法理解这个问题。 假设 unixtime 是自 1970.1.1 以来的总秒数,为什么 datetime.utcnow().timestamp() 返回不同的数字? >>> from dateti
我将使用 UtcNow 值作为 Azure 上复合键的一部分。我想将日期/时间转换为对人类和计算机都友好的东西。像这样的:2016021416512345 => 2016/02/14 4:51:23
我有一个从客户那里收到的 TimeZone,我用它来设置过期日期时间,这样它就相当于客户时区中“月末”的 UTC。 我试过这个: var current = timezone.ToUniversalT
我遇到了一个很难解决的问题,这是 DateTime.UtcNow 的结果。在我的本地机器上打印时它给了我正确的时间,但在我的服务器上它提前了 3 小时。这就是我在 Razor View 中打印的方式:
假设我在单个方法中对 DateTime.UtcNow 的两次调用之间有一个很长的简单数学循环。 DateTime.UtcNow 是否会在同一方法中返回两个不同的值,如果中间的代码花费的时间超过系统的计
我有一个 dll,它使用此代码以 UTC 格式记录日期时间,即`DateTime.UtcNow() 我正在运行一个控制台应用程序,该应用程序在两个不同的服务器中使用此 dll。一台服务器在“复活节时区
我的代码并没有什么特别之处。这基本上就是我所关心的。 节点.cs public class Node { public string Name { get; set; } public
在解决代码中的问题时,我已经签约构建我遇到了 DateTime.UtcNow 似乎不一致的结果。在我写这篇文章时,时间似乎在 1/19/2017 7:3x 和 1/20/2017 3:2x 之间波动。
这个(LINQPad 片段): DateTime.Now.ToString("yyyy-MM-ddTHH:mm:sszzz").Dump(); DateTime.UtcNow.ToString("yy
datetime.utcnow() 此调用返回的日期时间不正确,比 UTC/GMT 延迟 1 小时(登记:http://www.worldtimeserver.com/current_time_in_
我有以下内容: from datetime import datetime def get_report_month_key(): month_for_report = datetime.ut
我有一些具有 CreatedDate 和/或 UpdatedDate 属性的模型,在我的播种中,我将它们设置为 DateTime.UtcNow。 new TestModel() { Id =
这个问题在这里已经有了答案: How Can I Automatically Populate SQLAlchemy Database Fields? (Flask-SQLAlchemy) (2 个回
我在资源标签中使用 utcNow(),但我没有获取日期和时间,而是再次获取“[utcNow()]”。以下是我使用 Arm 模板的格式。 ARM 模板参数: "resourceTags": {
如何在 ADF 中将动态内容 utcnow() 格式化为“2021-06-01 13:42:59”之类的内容。我尝试过“yyyy-MM-dd HH:mm:ss”,但不起作用。 最佳答案 正如 @Joe
如何在 ADF 中将动态内容 utcnow() 格式化为“2021-06-01 13:42:59”之类的内容。我尝试过“yyyy-MM-dd HH:mm:ss”,但不起作用。 最佳答案 正如 @Joe
我是一名优秀的程序员,十分优秀!