kyle_cole
Instructure
Instructure

Intro:

When accessing your data via the DAP CLI or the API, it is important to understand where your data lives. DAP has a few different namespaces to break out the different data points that are available. A namespace is an abstract container or environment created to hold a logical grouping of unique identifiers. With DAP a namespace is used to contain the different areas of data that are being used. At the time of writing this post, there are three different namespaces:

  • canvas - holds the Canvas tables
  • canvas_logs - holds the tables for access logs
  • catalog - holds the Catalog tables (If you do not have a Catalog instance, the tables will be blank)


Here is the link to the documentation about available namespaces: Dap Datasets. Below, I am going to go over how to access the different namespaces via the API and CLI tool and what errors may occur when not using an available name space.


API:
Let's break down where to set the namespace in the API URL:

{{base_url}}/dap/query/{{namespace}}/table/{{table_name}}/data


As you can see, after "query" we declare the namespace of where you want the table to be located. For example, if we wanted to get the web_logs table, this is what the URL would look like:

https://api-gateway.instructure.com/dap/query/canvas_logs/table/web_logs/data

 

If you were to use a namespace that is not available, you would receive an “Object Not Found” type error. Below is a sample of the error you will encounter:

{

   "error": {

       "uuid": "5da0c0f3-0ff6-41dd-a2bc-2d0b8ff2a0a0",

       "kind": "namespace",

       "id": "something",

       "message": "The namespace 'someting' specified in the request is not valid.",

       "type": "ObjectNotFound"

   }

}


CLI:

Here is an example of that shows where to set the namespace when using the DAP CLI tool with your credentials set as environment variables:

dap initdb --connection-string postgresql://kyle:password@server.example.com/testdb --namespace canvas_logs --table web_logs

 

After the “--namespace” declaration, that is where you set the namespace in which the table you want is located. In the example above, we are using the canvas_logs namespace to access the web_logs table. As of v1.0 of the DAP CLI, you must declare a namespace; if you do not declare a namespace, you will receive the following error:

error: the following arguments are required: --namespace



If you declare a namespace that is not available, you will receive this error:

ERROR - namespace something not supported


Outro:

Just to recap, understanding and using the correct namespaces is important when it comes to accessing the data you want. If I have missed anything or if you have any questions, feel free to comment below!

more
4 0 81
kyle_cole
Instructure
Instructure

Unlock the power of the Data Access Platform CLI & Client Library! Learn how to seamlessly integrate with Postgres and MYSQL databases while mastering essential commands and environment setup. Dive into our comprehensive guide for effective database interaction and elevate your Canvas Data experience today.

Read more...

more
1 0 467
Edina_Tipter
Instructure Alumni
Instructure Alumni

In the past two days, our weblogs (including user_agents table) data processing experienced some issues while completing the query jobs for customers in the North Virginia region. As an effort to prevent a wider incident and maintain Canvas Data 2 main functionality and uptime, the ability to query Weblogs (including user agents) was temporarily turned off for customers in North America (us-east-1 AWS Region, or IAD). Thus any queries targeting Weblogs will result in Error 503: "The namespace 'canvas_logs' specified in the request is currently not available for querying due to internal errors."  Queries of tables from the Canvas or Catalog namespaces are completed successfully. The issue is contained to the North Virginia region and impacts less than 40 customers.
 
The team is currently investigating the impact of queries targeting Weblogs on overall performance of CD2, which might require a few days even.
 
Please bear with us, I will keep you posted. 

 

--------------------------------------------------------

Update on weblogs (5 Oct, 2023): the fix is on its way and we are targeting next week to release it after it undergoes a testing phase.

--------------------------------------------------------

Update on weblogs (13 Oct, 2023): the fix we wanted to release has not successfully passed the tests last weekend. Throughout this week, we have undertaken revisions, and today we will subject it to further testing and continuous monitoring throughout the weekend.Should it meet the anticipated standards, the release will be scheduled for Monday.

--------------------------------------------------------

Update on weblogs (17 Oct, 2023): We wish to inform all consumers of CD2 weblogs in the Northern Virginia region that both the weblogs and user_agents tables are now available for querying. Yet, we have identified a gap in the data for Sunday, October 8th. We are currently assessing potential solutions for data restoration for this day, although we anticipate a longer resolution timeframe due to the development effort required on Instructure’s part. In the interim, should anyone require immediate mitigation for this data gap, the CD1 requests table can be utilized as a temporary workaround. We apologize for any inconvenience this event may have caused.

more
1 16 2,133
Edina_Tipter
Instructure Alumni
Instructure Alumni

This is a notice to customers, that our data processing experienced some issues and queries returned 502 while execution time started to increase. We have set the Canvas Data 2 status to Performance degraded, see https://status.instructure.com/, yet I will provide further updates as part of this post.

The impact is contained to the North Virginia region.

The timeouts started during the weekend but the applied quick fixes were temporary thus work is ongoing to make the service fully operational and stabile.

----------------------------------------------------------------

The incident has been resolved on Sep 25, 14:01 MDT. The CD2 service is up and running.

more
0 0 247
kyle_cole
Instructure
Instructure

Discover how Canvas Data 2 revolutionizes education with its comprehensive analytics, empowering institutions to analyze student and course activities for informed decision-making. From generating API keys to unleashing the potential of visualization tools, this article unveils the essential steps to harness the true power of Canvas Data.

Read more...

more
8 2 5,286
jpoulos
Instructure Alumni
Instructure Alumni

Please review whether your integrations will be affected by this change.

Read more...

more
0 1 682
NipaThakker
Community Member

Queries for Canvas metrics. 

Anyone have sql queries for clicks, views for assignments by college. And other metric queries for external ,tools used, submissions in a day by college. If you have a starting point of queries please help.  

 

more
0 2 1,189
Jeff_F
Community Champion

  • Need to know which courses have assignments created?
  • Need to know what type and how many assignments instructors use?
Read more...

more
0 0 1,071
oxana
Instructure Alumni
Instructure Alumni

Weekend outage affecting the North Virgina region.

Read more...

more
2 1 1,167
oxana
Instructure Alumni
Instructure Alumni

The Caliper event transformation logic is being updated, effective Monday, 12 October 2020.

Read more...

more
0 0 1,063
oxana
Instructure Alumni
Instructure Alumni

For August 24, Canvas Data customers will see this 20% omission reflected within the monthly historical refresh file and the New Analytics Weekly Online Activity totals.

Read more...

more
0 0 1,165
oxana
Instructure Alumni
Instructure Alumni

North Virginia region: data loss from 8/24, 8/25, and 8/26

Read more...

more
0 2 1,808
gshinde
Instructure
Instructure

In the Canvas Data (2018-12-11) release, an identifier that is a reserved word in some systems (such as AWS Redshift) was introduced in some Outcomes Tables. The ‘percent’ column in the learning_outcome_result_fact and learning_outcome_question_result_fact tables can cause complications in your imports.

If you are using an SQL database where ‘percent’ is a reserved word you may want to consider using a different identifier for the column name. If you would like to use ‘percent’ as the column name, to resolve any resulting complications, escape the ‘percent’ columns in the learning_outcome_question_result_fact and learning_outcome_result_fact tables by putting quotation marks around the column names in your SQL queries and DDL statements.

The Version numbers were recently updated to accommodate some data type fixes with Outcomes data. ‘Precision’ was updated to ‘Double Precision’ for consistency with other data types in Canvas Data. Additionally, the Catalog data schema preview was rolled back because an invalid data was included.

more
3 1 1,503
cward
Instructure Alumni
Instructure Alumni

We're proud to introduce a Canvas Network course being offered FREE by Jing Qi and Brian Reid of Dartmouth College. The course is titled "Analytics in Course Design: Leveraging Canvas Data," and will help faculty and instructional designers explore Canvas Data and visualization techniques to make informed decisions about Canvas course design.

You can enroll in this self-paced course here: Analytics in Course Design: Leveraging Canvas Data - Canvas Network | Free online courses | MOOCs

About the instructors:

f000f2p, Ed.D

Learning Analytic and LMS Specialist

Dr. Jing Qi serves as the LMS and Learning Analytic Specialist at Dartmouth College. She holds a bachelor's degree in Computer Science, and a doctorate degree in education. Using her solid background in computer science, extensive experience in educational data mining, and strong interest in data visualization, she integrates the core elements of learning analytics and instructional technology in the exploration of Analytics in Instructional Design.

Brian Reid, Ph.D

Instructor

Dr. Brian Reid works as an Associate Director of Information Technology at Dartmouth's Geisel School of Medicine where he supports curricular applications. With a background in chemistry and educational technology, he has been creating data visualizations for three decades. Dr. Reid has written software to animate molecular motion, visualize mathematical models, plot biological and geological data, and simulate lab experiments. His most recent efforts have focused on visualizing curricular data at the Geisel School of Medicine.

more
10 1 1,721