Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 18015

Creating a new table in Power BI

$
0
0

Hello everyone,

 

I'm using a node.js application to query the powerBI API to automate some of my workflow. I currently have a working authenticating application using the ADAL library. Ideally I'm looking to have a script see if a dataset exists, if it doesn't - create it, and add some data. Currently when I post the data to create a table the response is always returned with the value "addRowsAPIEnabled:false" , is there something I could change about the create call to make this possible ?

 

 

 

let createDatasetBody = { 
    "name": datasetLabel, 
    "tables":   
    [{"name": "test", "columns":   
        [
          { "name": "created", "dataType": "DateTime"},  
          { "name": "signedWaiver", "dataType": "Boolean"},   
          { "name": "firstName", "dataType": "String"},   
        ]  
      }  
    ]
  };
  let _options =  {
    uri: "https://api.powerbi.com/v1.0/myorg/groups/" + groupId + "/datasets" ,
    headers: {
      'Authorization':  " Bearer "+ validToken.accessToken 
    },
    body : JSON.stringify( createDatasetBody ),
    method: 'POST'
  } ; 

 

I didn't see much in the documentation clarifying too much of the options besides data retention. 

 


Viewing all articles
Browse latest Browse all 18015

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>