powerbi输入数据_获取数据集以添加行 - Power BI | Microsoft Docs

步骤 4:获取数据集以将行添加到 Power BI 表Step 4: Get a dataset to add rows into a Power BI table

02/05/2019

本文内容

本文是将数据推送到数据集的分步演练的一部分。This article is part of a step-by-step walkthrough to push data into a dataset.

在将数据推送到数据集的步骤 3(在 Power BI 中创建数据集)中,你调用了创建数据集操作以在 Power BI 中创建数据集。In step 3 of Push data into a dataset, Create a dataset in Power BI, you called the Create Dataset operation to create a dataset in Power BI. 在此步骤中,你将使用获取数据集操作和 Newtonsoft.Json 来获取数据集 ID。在步骤 4 中使用数据集 ID 向数据集添加行。In this step, you use the Get Datasets operation and Newtonsoft.Json to get a dataset id. You use the dataset id in step 4 to add rows to a dataset.

要将数据推送到 Power BI 数据集,需要引用数据集中的表。To push data into a Power BI dataset, you need to reference the table in the dataset. 要引用数据集中的表,首先需要获取数据集 ID。To reference a table in a dataset, you first need to get a Dataset ID. 使用获取数据集操作获取数据集 ID 。You get a Dataset ID using the Get Datasets operation. “获取数据集” 操作将返回一个 JSON 字符串,它包含 Power BI 中所有数据集的列表。The Get Datasets operation returns a JSON string containing a list of all datasets in Power BI. 对 JSON 字符串进行反序列化的推荐的方法是使用 Newtonsoft.Json。The recommended way to deserialize a JSON string is with Newtonsoft.Json.

下面介绍如何获取数据集。Here's how you get a dataset.

获取 Power BI 数据集Get a Power BI dataset

注意: 在开始之前,先确保已按将数据推送到数据集演练中之前的步骤进行了操作。NOTE: Before you get started, make sure you have followed the previous steps in the push data into a dataset walkthrough.

在步骤 2 中创建的控制台应用程序项目中:推送数据演练,获取身份验证访问令牌,安装 Newtonsoft.Json NuGet 包。In the Console Application project you created in Step 2: Walkthrough to push data, Get an authentication access token, install the Newtonsoft.Json NuGet package. 下面介绍了安装此程序包的方法:Here's how to install the package:

a.a. 在 Visual Studio 2015 中,选择工具 > NuGet 包管理器 > 程序包管理器控制台。In Visual Studio 2015, choose Tools > NuGet Package Manager > Package Manager Console.

b.b. 在包管理器控制台中,输入 Install-Package Newtonsoft.Json。In Package Manager Console, enter Install-Package Newtonsoft.Json.

安装包后,将 using Newtonsoft.Json; 添加到 Program.cs。After the package is installed, add using Newtonsoft.Json; to Program.cs.

在 Program.c

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值