Del via


Push Datasets - Datasets PutTable

Updates the metadata and schema for the specified table within the specified dataset from My workspace.

Required Scope

Dataset.ReadWrite.All

Limitations

This API call only supports push datasets.

PUT https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/tables/{tableName}

URI Parameters

Name In Required Type Description
datasetId
path True

string

The dataset ID

tableName
path True

string

The table name

Request Body

Name Required Type Description
columns True

Column[]

The column schema for this table

name True

string

The table name

description

string

The table description

isHidden

boolean

Optional. Whether this dataset table is hidden.

measures

Measure[]

The measures within this table

rows

Row[]

The data rows within this table

source

ASMashupExpression[]

The table source

Responses

Name Type Description
200 OK

Table

OK

Examples

Example

Sample request

PUT https://api.powerbi.com/v1.0/myorg/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/tables/Product
{
  "name": "Product",
  "columns": [
    {
      "name": "ProductID",
      "dataType": "Int64"
    },
    {
      "name": "Name",
      "dataType": "string"
    },
    {
      "name": "Category",
      "dataType": "string"
    },
    {
      "name": "IsCompete",
      "dataType": "bool"
    },
    {
      "name": "ManufacturedOn",
      "dataType": "DateTime"
    },
    {
      "name": "NewColumn",
      "dataType": "string"
    }
  ]
}

Sample response

{
  "name": "Product"
}

Definitions

Name Description
ASMashupExpression

A dataset table source

Column

A dataset column

Measure

A Power BI measure

Row

A data row in a dataset

Table

A dataset table

ASMashupExpression

A dataset table source

Name Type Description
expression

string

The source expression

Column

A dataset column

Name Type Description
dataCategory

string

Optional. The string value to be used for the data category which describes the data within this column.

dataType

string

The column data type

formatString

string

Optional. The format of the column as specified in FORMAT_STRING.

isHidden

boolean

Optional. Whether the column is hidden. The default is false.

name

string

The column name

sortByColumn

string

Optional. String name of a column in the same table to be used to order the current column.

summarizeBy

string

Optional. The aggregate function to use for summarizing this column.

Measure

A Power BI measure

Name Type Description
description

string

Optional. The measure description.

expression

string

A valid DAX expression

formatString

string

Optional. A string describing how the value should be formatted when it's displayed as specified in FORMAT_STRING.

isHidden

boolean

Optional. Whether the measure is hidden.

name

string

The measure name

Row

A data row in a dataset

Name Type Description
id

string

The unique row ID

Table

A dataset table

Name Type Description
columns

Column[]

The column schema for this table

description

string

The table description

isHidden

boolean

Optional. Whether this dataset table is hidden.

measures

Measure[]

The measures within this table

name

string

The table name

rows

Row[]

The data rows within this table

source

ASMashupExpression[]

The table source