数据工厂没有内置的日期差异功能。我想在 if 条件活动中比较 lastModified 日期和 utcnow 。我怎样才能实现它?
@greaterOrEquals(activity('Get Metadata1').output.lastModified, '2015-03-15T13:27:36Z')
Run Code Online (Sandbox Code Playgroud) 我已经安装了 Microsoft Integration Runtime 配置管理器当我将数据从本地 SQL Server 迁移到 Azure Data Lake 以及当我尝试将其用于另一个 Azure 数据工厂时,我找不到为数据添加新密钥的空间工厂。怎么做。提前致谢
azure azure-data-lake azure-data-factory-2 azure-sql-data-warehouse
这已解决,解决方案在底部找到。
我有一个执行数据流的 Azure DataFactory V2 管道。
Azure Sql 源表有一个 Date not null 列 DateReported。这是从外部来源导入的。其中空值为 1899-01-01。
目标 Sql 表具有相同的字段 DateReported 但日期为 null
我在数据流中使用派生列来清理数据。我想在日期为 1899-01-01 时插入 null
我的派生列函数是这样的
iif(!(year(DateReported) == 1899 || year(DateReported) == 1753)
, DateReported
, null()
)
Run Code Online (Sandbox Code Playgroud)
这给了我错误“表达式应该返回与先前表达式相同类型的‘时间戳’”。
如果我将 iif 反转为这个
iif((year(DateReported) == 1899 || year(DateReported) == 1753)
, null()
, DateReported
)
Run Code Online (Sandbox Code Playgroud)
我收到错误“表达式应该返回与先前表达式相同的类型‘空’”
我可以像这样从源代码在 sql 中修复此问题
Select ...
DateReported2 =
CASE
WHEN DateReported is null THEN DateReported
WHEN YEAR(DateReported) = 1899 THEN NULL
ELSE DateReported
End
...
Run Code Online (Sandbox Code Playgroud)
但这很混乱,因为我所有的其他逻辑都在数据流中。 …
我有一个设置自签名证书的网络服务器。
当我使用 ADF v2 中的 Web Activity 向 HTTPS URL 发送发布请求时,我收到错误消息:
“调用端点'https://...'时出错。响应状态代码:''。更多详细信息:异常消息:'发送请求时出错。'。端点没有响应。可能的原因:网络连接、DNS 失败、服务器证书验证或超时。
无论如何,我可以取消 Web 活动服务器证书验证或任何使 Web 活动与自签名证书一起使用的解决方法吗?
我已经被这个问题困扰了几天,因此非常感谢您的帮助。首先十分感谢。
对于上下文,我目前有一个 Data Factory v2 管道,其中有一个ForEach Activity调用Copy 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": …Run Code Online (Sandbox Code Playgroud) 团队。
我有使用 Web Activity 处理 ADF2 中的错误的情况。在管道中,任何活动失败,都应该触发网络活动。我在每个活动的failed状态之后附加了网络活动。因此,网络活动的dependsOn属性如下所示:
"dependsOn": {
"activity1": [
"Failed"
],
"activity2": [
"Failed"
]
}
Run Code Online (Sandbox Code Playgroud)
然而,网络活动只有在所有activity1和activity2失败时才会被触发。我想要的是得到那个要么解雇activity1或activity2失败。相反,我使用了该IfCondition活动,但它似乎不是正确(正确或正确)的方式。最好的做法是什么?
我试图从过滤中获取所有活动pipeline().activities,但也不支持。
我有一个 azure blob 容器,其中每 6 小时放置一些带有数据的 json 文件,我想使用 Azure 数据工厂将其复制到 Azure SQL DB。文件的文件模式是这样的:“customer_year_month_day_hour_min_sec.json.data.json”
blob 容器也有其他 json 数据文件,因此我对数据集中的文件进行了过滤。
第一个问题是如何在 blob 数据集上设置文件路径以仅查找我想要的 json 文件?我尝试使用通配符 *.data.json 但这不起作用。我开始工作的唯一文件名通配符是 *.json
第二个问题是如何仅将数据从位于 blob 存储中的新文件(具有特定文件模式)复制到 Azure SQL?我无法控制将数据放入 blob 容器的过程,也无法将文件移动到另一个位置,这使得操作变得更加困难。
请帮忙。
所以我创建了一个小的 pyspark 应用程序并将其转换为一个鸡蛋。将其上传到 dbfs:/FileStore/jar/xyz.egg。在 ADF 中,我使用了 jar 活动。但是在主类名称文本框中,我很困惑要提供什么。
我的 Pycharm 应用程序有三个文件,其中两个基本上是实用程序文件,其中包含我调用的实用程序函数,主文件的内容是:
主文件
from CommonUtils import appendZeros
from sampleProgram import writedf
def main():
appendZeros('zzz')
writedf()
if __name__ == "__main__":
main()
Run Code Online (Sandbox Code Playgroud)
现在在“主类名”文本框中指定什么?
我正在提高我的 Azure 数据工厂能力,比较复制活动性能与映射数据流写入 Azure Blob 存储中的单个 CSV 文件。
当我通过数据集 (azureBlobSingleCSVFileNameDataset) 通过 Azure Blob 存储链接服务 (azureBlobLinkedService) 写入单个 CSV 时,使用复制活动在我期望的 blob 存储容器中获取输出。例如,文件夹/output/csv/singleFiles 下的容器MyContainer 中的MyData.csv 的输出文件。
当我通过相同的 Blob 存储链接服务但通过不同的数据集 (azureBlobSingleCSVNoFileNameDataset) 写入单个 CSV 时,使用映射数据流,我得到以下信息:
我不明白为什么在使用映射数据流时会生成零长度文件。
这是我的源文件:
链接服务/azureBlobLinkedService
{
"name": "azureBlobLinkedService",
"type": "Microsoft.DataFactory/factories/linkedservices",
"properties": {
"type": "AzureBlobStorage",
"parameters": {
"azureBlobConnectionStringSecretName": {
"type": "string"
}
},
"annotations": [],
"typeProperties": {
"connectionString": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "AzureKeyVaultLinkedService",
"type": "LinkedServiceReference"
},
"secretName": "@{linkedService().azureBlobConnectionStringSecretName}"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
数据集/azureBlobSingleCSVFileNameDataset
{
"name": "azureBlobSingleCSVFileNameDataset",
"properties": {
"linkedServiceName": …Run Code Online (Sandbox Code Playgroud) 我是 Azure 数据工厂的新手。在开发管道时,我在 Azure 数据工厂中找不到撤消操作。ctrl+z不工作。撤消的键盘快捷键是什么?