[{"id":"bcb0874d-299b-448e-9552-9e9b25ef80dd","tags":[{"product":null,"links":null,"id":"ba7e818e-4f6b-4211-b1ac-58e3bafcf439","name":"\u66F4\u65B0","color":"orange","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"8ce3627e-9e58-471b-9133-4f135d191e7b","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"ae60ae59-34f5-4f32-a8eb-243ed1457543","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"3d4848c3-910f-4ffa-9153-60bb507334a9","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"133f4ca6-d951-4d65-a618-3dc6301266f7","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"de62ec1c-813e-40b1-8160-a4cd109afe64","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"2426c71d-8332-4cbd-a436-1ec4f8666464","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"2ce7b6b0-78aa-4e4b-bf8a-e4ba2f988298","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"4706db46-0811-4652-8f59-1e0a1da84758","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"8f1271bb-2cd9-4f39-9897-c15b239ee7ab","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"677e13a7-6f3e-449f-986c-2c3a26f8d54f","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"5e40f6dc-caec-49d7-a1d0-be65f06815ba","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"2457f0e0-9e71-4860-a87d-065e0fb84f84","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"d5c67fd0-1145-482c-9113-97b492c44c18","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"a609a8fa-ab91-4c1d-a1c3-d209d0463303","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"b4a9eb15-94e5-48df-b218-a24138f0cf9c","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]}]
        
(Showing Draft Content)

示例二:集成数据集/数据源/数据模型

功能概述

如果要在业务应用系统中集成Wyn 的数据集、数据源或数据模型,可采用URL集成方式。

这种集成方式的核心是设置一个带参数(QueryString)的网址(URL),作为业务系统中某个菜单链接的目标地址,或者是作为业务系统页面中某个iframe元素的src属性值。

集成原理和方法与集成仪表板或报表一致,文中以集成数据集为例进行介绍。

因为数据模型不支持预览,所以也不支持直接集成某个数据模型的预览状态。但是支持集成数据模型设计器。

操作介绍

1. 在新窗口打开数据集

选中数据集,单击页面右上角的新窗口打开按钮,在新的浏览器窗口中打开数据集。

image

2. 获取原始URL

将URL地址拷贝粘贴到记事本中待用。

image2021-6-7_15-59-24.png

3. 获取访问令牌

在获取到 URL 后,需要添加用户令牌来进行身份认证和权限认证,其格式为一系列包含字母和数字的字符串,例如:

A2D2D9E4EBF94D15F0597A9A1D2A756ED8AE0874D2BD4B1C01070DAAFCB9A4B6

如何生成和获取令牌请参考生成令牌一节。在获取到令牌后,将其添加到目标URL的末尾,并使用“?token=” 进行连接,得到的URL字串如下,

http://localhost:51980/datasets/view/b0082554-9c66-4605-8cf3-5f1ffbd9c314?theme=default&lng=zh&token=A2D2D9E4EBF94D15F0597A9A1D2A756ED8AE0874D2BD4B1C01070DAAFCB9A4B6

注意

生成令牌时使用的用户名,应具有待访问文档的查看权限。

集成设计器

集成编辑页面

  • 编辑数据集或数据源只需将集成URL中的“view”改为“edit”即可,例如:

    http://localhost:51980/datasets/edit/b0082554-9c66-4605-8cf3-5f1ffbd9c314?token=d40f220a.....

    http://localhost:51980/datasources/edit/b0082554-9c66-4605-8cf3-5f1ffbd9c314?token=d40f220a.....

  • 编辑数据模型集成编辑数据模型时还需注意将URL中的文档类型关键字更换为“analytics

    http://localhost:51980/analytics/edit/99b4b033-c475-4f0a-afce-f4e5164d231a?token=2cb6c4d1717902b9a...

    其中数据模型文档的ID可以在站点中选中模型后的URL中查看。

    image

集成新建页面

注意

集成新建页面时,请注意用于生成令牌的用户需具有创建对应文档的权限。

在业务系统中集成创建数据集的页面时,只需将集成URL中的“ view ”改为“ create ”,省略“ id ”部分并添加type参数,来确定数据集的类型。

  • 创建数据源http://localhost:51980/datasources/create?token=2cb6c4d1717902b9a...

  • 创建流式数据集http://localhost:51980/datasets/create?type=streamingdataset&token=2cb6c4d1717902b9a...

  • 创建推送数据集http://localhost:51980/datasets/create?type=pushdataset&token=2cb6c4d1717902b9a...

  • 创建缓存数据集http://localhost:51980/datasets/create?type=cacheddataset&token=2cb6c4d1717902b9a...

  • 创建直连数据集http://localhost:51980/datasets/create?type=directdataset&token=2cb6c4d1717902b9a...

  • 创建原生查询数据集: http://localhost:51980/datasets/create?type=nativequerydataset&token=2cb6c4d1717902b9a...

  • 创建直连模型http://localhost:51980/analytics/create?token=2cb6c4d1717902b9a...

  • 创建抽取模型:http://localhost:51980/analytics/create?mode=cachemode&name=newCacheMode&token=2cb6c4d1717902b9a...其中&name=newCacheMode用来指定模型的名称。如省略这一段,则使用默认名称 Default_1(2,3...) 打开设计器。