A partire da gennaio 2021, i tipi di file classici non potranno più essere utilizzati. È possibile effettuare la transizione dei file classici o scaricare un PDF. Ulteriori informazioni

Create a table API JSON Body

Con risposta
0

Commenti

1 commento

  • Jeff Hickey

    Hi Jase the Ace, please see TableDto type for more information about the body parameter of the Create a new table endpoint.

    At minimum, you must include "name", "tableScehma", and "type." "datasetUpdated", "hierarchyMetadata", and "uniqueTableConstraints" can be omitted. Below is sample Python request that uses the minimum body payload to create a new Data table called "Table Name" with the column "columnName" of type string (update values in italics).

    import requests
    import json

    url = "https://h.<location>.wdesk.com/s/wdata/prep/api/v1/table"

    payload = json.dumps({
    "name": "Table Name",
    "tableSchema": {
      "columns": [
        {
          "name": "columnName",
          "type": "string"
        }
      ]
    },
    "type": "data"
    })

    headers = {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': '<valid token>'
    }

    response = requests.request("POST", url, headers=headers, data=payload)
    print(response.text)
    0

Accedi per aggiungere un commento.