- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试构建一个(我认为)非常简单的管道:
我认为这只需 1 个复制事件即可完成,但现在我认为我错了。
在 de Copy 事件中,Sink 配置如下所示:
"sink": {
"type": "AzureSqlSink",
"sqlWriterStoredProcedureName": "[dbo].[spParseJson]",
"sqlWriterTableType": "What to enter here?",
"storedProcedureTableTypeParameterName": "What to enter here?",
"storedProcedureParameters": {
"Json": {
"type": "String",
"value": "<output of Source>"
}
}
}
我确实尝试阅读和理解文档,但恕我直言,文档并没有解释太多,或者解释得很模糊。
“Source 的输出”应该是 Source 的输出。但是要使用什么函数或变量呢?
我应该为“sqlWriterTableType”/“storedProcedureTableTypeParameterName”输入什么?经过一番挖掘,我了解到 ADF 将创建临时表等,但这不是我想要的。
我还尝试了另一种方法:
但后来我发现Web事件限制为1MB。 Json 约为 1.5 MB。如果没有限制,那么我会有一个解决方案。啊。
仅供引用:Json 的内容具有动态变化的架构,并且结构不佳,因此我实际上无法使用 ADF 中的标准映射功能。
感谢任何帮助或指导。如果您知道一些内容丰富的文档,那么这也会有所帮助。
最佳答案
我更新了这个答案,将其分为两部分。第一部分涉及一个简单的实现,它将 Json 响应大小限制为 ~1MB。第二部分处理更复杂的实现,不对 Json 响应大小施加此限制。
第 1 部分
这将允许您将 GetJson Web Activity 的输出传递到存储过程 Activity。
接下来,您需要向存储过程事件添加一个参数,以便它可以动态接收第一步的链接输出。
这应该使您能够成功传递信息。
这是相关管道的 Json 表示形式:
{
"name": "get-request-output-to-mssql-stored-procedure",
"properties": {
"activities": [
{
"name": "GetJson",
"type": "WebActivity",
"dependsOn": [],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"url": "https://jsonplaceholder.typicode.com/posts/1",
"method": "GET"
}
},
{
"name": "Exec stored proc",
"type": "SqlServerStoredProcedure",
"dependsOn": [
{
"activity": "GetJson",
"dependencyConditions": [
"Succeeded"
]
}
],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"storedProcedureParameters": {
"Json": {
"value": {
"value": "@activity('GetJson').output",
"type": "Expression"
},
"type": "String"
}
}
},
"linkedServiceName": {
"referenceName": "your-server-def",
"type": "LinkedServiceReference"
}
}
],
"annotations": []
}
}
第 2 部分
我们将结合使用查找事件以及链接服务定义和 Json 数据集定义,而不是创建 Web 事件。
您需要创建 HTTP 类型的链接服务。
并将其配置为使用您想要从中获取 Json 响应的 URL:
然后,您可以创建一个新的数据集(HTTP 类型),它将使用此链接服务来获取数据。
并选择 Json 作为其格式类型:
然后您可以设置请求 URL,并将架构(除非您需要)设置为 None。
然后,您可以创建一个使用 Json 数据集作为源数据集的 Lookup 事件,并将请求方法设置为 GET。
这是相关管道的 Json 表示形式:
{
"name": "get-request-output-to-mssql-stored-procedure-2",
"properties": {
"activities": [
{
"name": "Exec stored proc",
"type": "SqlServerStoredProcedure",
"dependsOn": [
{
"activity": "RetrieveJson",
"dependencyConditions": [
"Succeeded"
]
}
],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"storedProcedureParameters": {
"Json": {
"value": {
"value": "@activity('RetrieveJson').output",
"type": "Expression"
},
"type": "String"
}
}
},
"linkedServiceName": {
"referenceName": "ASD_SINGLE",
"type": "LinkedServiceReference"
}
},
{
"name": "RetrieveJson",
"type": "Lookup",
"dependsOn": [],
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"userProperties": [],
"typeProperties": {
"source": {
"type": "JsonSource",
"storeSettings": {
"type": "HttpReadSettings",
"requestMethod": "GET"
},
"formatSettings": {
"type": "JsonReadSettings"
}
},
"dataset": {
"referenceName": "JsonDataset1",
"type": "DatasetReference"
},
"firstRowOnly": false
}
}
],
"annotations": []
}
}
关于Azure 数据工厂,将 REST GET 响应传递给 Azure SQL 数据库中的存储过程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62935804/
我知道使用 GET 和 SET 函数的公共(public)变量的缺点/私有(private)变量的优点,但目前我正在使用 Ogre3D 开发自己的第一个“真实”游戏(C++)..同时,我有时需要 6-
我正在开发一个 GSM/GPRS 应用程序,它将每 10 秒报告一些值。我必须使用的 SIM 卡每月只有 15MB 可用数据。我使用的是 SIM900 GSM 芯片供您引用。 我到达服务器的方式是通过
这三者有什么区别:gets - 它获取带有 '\n' 的行gets.chomp - 它得到一行,但删除 '\n' 这样对吗? gets.chomp! 怎么样? 最佳答案 gets - 它得到一个末尾带
问题和我现在遇到的问题 脚本 顺便说一句,评论是挪威语的,如果它们看起来很奇怪哈哈 Connect-AzureAD #variabel $Users = Get-AzureADUser -All:$t
我现在面临的问题是获取一个 URL,如下所示: www.example.com/example.php?url=www.google.com 现在的问题是,如果我的网址中有一个 get,如下所示: w
我有一个 queryString 传递给 servlet 的 doGet() 方法,如下所示: count=9&preId0=-99&objId0=-99&preId1=-99&objId1=-99&
这是我在 Django 模板中的代码: {% for tag in tags %} {{ tag }} {% endfor %} 在view.py中: def tag_find(
我正在尝试在express.js中为我的网络应用程序创建一个路由系统,我需要知道是否需要使用app.get/post/put/delete.apply以编程方式设置多个功能对于一条路线。 也是如此 a
我正在通过示例查看 A.Mele Django,第 1 章 def post_list(request, category=None): object_list = Post.publishe
如果我想找到与IIS站点或应用程序关联的目录,我该怎么做? 我似乎无法从Get-Website和Get-WebApplication的对象的任何属性中找到任何允许我这样做的东西。 最佳答案 只需查看一
不知道发生了什么。当我执行以下代码时......它运行良好......但它产生了错误。如果我将以下内容粘贴到我的浏览器地址栏中并点击它,我会得到一个 URL。如果我通过 KRL http:get 输入
Curl 提供了一系列不同的带有 X 前缀的 http 方法调用,但也提供了不带 X 的相同方法。我两种都试过了,但我似乎无法弄清楚其中的区别。有人可以快速向我解释这两种操作有何不同吗? 最佳答案 默
request.GET.get 是什么意思?我在 Django 中看到类似的东西 page = request.GET.get('page', 1) 我认为它与类似的东西有关 « 它们是如
我正在从我的 Angular2 站点查询一些 Elasticsearch 服务器。为了帮助提高安全性,我们希望锁定对 GET 请求的访问权限。 Elasticsearch 支持带主体的 GET,但我在
关闭。这个问题是opinion-based .它目前不接受答案。 想改善这个问题吗?更新问题,以便可以通过 editing this post 用事实和引文回答问题. 4年前关闭。 Improve t
调用 HTable.get(List) 返回的 Result 数组的顺序是什么? ? 我的意思是,假设与输入列表的顺序相同是否正确? 最佳答案 结果数组中的顺序将与输入列表的顺序相同。与批处理方法一样
所以我有一个看起来像这样的 JSON 数组: var myData = { foo : { biz : 'baz', fig : 'tree' } }
我正在学习 Ajax、javascript 和 html,并且有一个应用程序可以触发“get”请求,然后再触发另一个“get”请求。这些请求是用户按下按钮的结果。在我的 servlet 中,我使用 T
关闭。这个问题是opinion-based 。目前不接受答案。 想要改进这个问题吗?更新问题,以便 editing this post 可以用事实和引文来回答它。 . 已关闭 6 年前。 Improv
运行以下 cmdlet 适用于组成员(Amer 域中的组)中的所有用户,无论列出的用户位于哪个域: Get-ADGroupMember -Server amer 但是,当尝试通过管道传输到 Get-
我是一名优秀的程序员,十分优秀!