cancel
Showing results for 
Search instead for 
Did you mean: 
petern
Adventurer

Connect canvas data to power bi

I'm trying to pull Canvas data into Power BI and I'm struggling at the first hurdle.  How do you get Power BI to read the data from Canvas?  

I've read through the guides and I'm still lost.

 
0 Kudos
4 Replies
robotcars
Navigator

@petern

What step are you on?

Have you downloaded the files yet, either using the Canvas Data Portal, or the API?

I haven't used PowerBI, but assume it's much like Tableau, where it can read flat files or connect to a database. For quick looks, the flat files can be downloaded and viewed; but for more robust setups, the API can be used to script a job that downloads new files every day and loads them into a database.

If you have the files, they are gzip compressed... double clicking them should unpack them, or maybe use WinZip. The CLI has an unpack feature as well.

petern
Adventurer

Hi @robotcars 

From PowerBI, I can go to Get Data > Web and input something like

https://<canvas>.instructure.com/api/v1/accounts?access_token=<token>

But that's just loading the JSON information from the normal Canvas API and only doing one query. 

I can download the files one by one and load them into PowerBI.  

I assume I can connect PowerBI to the Canvas Data API, but I'm finding the documentation difficult to understand.  I'm trying to set things up with the Canvas Data API and can't figure out the first step.  Is the Canvas Data API the same as the Canvas API?

robotcars
Navigator

Hi @petern 

The Canvas Data API is separate from the Canvas API.

Generally, the best way to handle this (and avoid tediously downloading each via the CD Portal) is to use the Canvas Data CLI. https://github.com/instructure/canvas-data-cli

Obtain the key and secret for your user.

https://community.canvaslms.com/t5/Admin-Guide/How-do-I-obtain-an-API-access-token-in-the-Canvas-Dat...

Using the CLI you can run a couple of commands to fetch or sync the files to a local desktop or server. There are also baked in commands to unpack those files. I assume PowerBI has the ability to read CSV/TSV files directly from disk, and if that's sufficient for you there's no need to load them into a database.

If loading into a database is necessary there are couple of community contributions for getting started.

I recently started using this one...

https://community.canvaslms.com/t5/Developers-Group/Build-a-Canvas-Data-Warehouse-on-AWS-in-30-minut...

But started here...

https://community.canvaslms.com/t5/Developers-Group/Managing-Canvas-Data-with-Embulk/ba-p/272746

 

 

 

petern
Adventurer

Thanks @robotcars !  I'll try the Canvas Data CLI later this week.