Connecting PowerSchool Data to Google Sheets Part 2: Install and test the PowerQuery (2024)

Connecting PowerSchool Data to Google Sheets Part 2: Install and test the PowerQuery (1)

If you need to understand the basics and the setup, or you have no idea what Google Apps Script is, go back to Part 1.

Step 1: Extract the Zip File Contents

You should have downloaded the file, “PowerQuery_Example_1_0.zip”.

Extract the contents to a folder, or to your Desktop.

Here is the structure:

Connecting PowerSchool Data to Google Sheets Part 2: Install and test the PowerQuery (2)

We are going to install this, and then test them in PowerSchool. You can upload it as is, and it will work, but, long term you need to learn to edit the structure. One of the biggest edits when using data externally is in the “plugin.xml” file.

Step 2": Open the the *._queries.xml File

You will find many plugin files online to test out. If you want to see what data they are accessing, and what they are doing, open the file inside the “queries_root” folder. In this case it is named, “example.named_queries.xml”.

<queries> <query name="org.psugcal.example.students.birthdays" coreTable="students" flattened="false"> <description>Birthday info for all Active Students - District Wide</description> <columns><column column="students.student_number">id</column><column column="students.lastfirst">name</column><column column="students.grade_level">grade_level</column><column column="students.dob">birthdate</column><column column="students.dob">age_years</column><column column="students.dob">month_day</column> </columns> <sql><![CDATA[SELECTstudent_number,lastfirst,grade_level,TO_CHAR(dob,'MM/DD/YYYY') as birthdate,floor(months_between(sysdate, dob) /12) AS age_years,TO_CHAR(dob,'mm/dd') AS month_dayFROMstudentsWHEREenroll_status = 0ORDER BY lastfirst]]> </sql> </query></queries>

Normally for the query name, org.psugcal.example.students.birthdays, I edit this to the domain I am working on. If your server is at “theschool.org”, you would modify this to “org.theschool.example.students.birthdays”. Whenever you see a domain reference, you should do this.

This SQL query retrieves specific information about students from a database. It selects the student number, full name, grade level, birthdate (formatted as MM/DD/YYYY), age in years, and birth month and day from the students table. The query only includes students who are currently enrolled (where enroll_status equals 0) and orders the results alphabetically by the students' full names (lastfirst).

Example:

| student_number | lastfirst | grade_level | birthdate | age_years | month_day |

|----------------|-----------------|-------------|-----------|-----------|-----------|

| 12345 | Doe, John | 10 | 05/15/2005| 19 | 05/15 |

| 67890 | Smith, Jane | 9 | 08/22/2006| 18 | 08/22 |

| 23456 | Brown, Charlie | 11 | 12/01/2004| 20 | 12/01 |

| 78901 | Johnson, Emily | 12 | 03/30/2003| 21 | 03/30 |

Step 3: Permissions folder and the XML file

Open the Permissions folder and XML file.

<permission_mappings> <permission name='/admin/home.html'><implies allow="post">/ws/schema/query/org.psugcal.example.students.birthdays</implies> </permission></permission_mappings>

All you need to know here is that anyone with access to “/admin/home.html” can run this plugin. Go ahead and update your domain.

Step 4: Plugin.XML

Open “plugin.xml”.

<?xml version="1.0" encoding="UTF-8"?><plugin xmlns="http://plugin.powerschool.pearson.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"description="Powerquery Example"name="PowerQuery Example (Birthdays)"version="1.0"xsi:schemaLocation="http://plugin.powerschool.pearson.com plugin.xsd"><publisher name="Jim Parsons"><contact email="jparsons@vcschools.org"/></publisher></plugin>

For now leave this alone. When you finally link this to Google, it will need to contain many more fields. This file holds the attributes to the author, so if you find this useful send him an email :).

If you want to change the name or description you can do that here. The version contol is useful and it is recommended that you develop a versioning system.

I often will create, edit, upload, and revise one of these 10-15 times before it is ready for production.

Step 5: Install the Plugin

Installing a Plugin in PowerSchool

  1. Start by selecting "System" under "Setup" in the main menu. This will take you to the System Administrator page.

  2. Under the "Server" section, click on "System Settings" to access the System Settings page.

  3. On the System Settings page, click on "Plugin Management Configuration" to access the Plugin Management Dashboard.

  4. Click on "Install" to access the Plugin Install page.

  5. You can either click on "Choose File" to select the plugin installation file or "Browse..." to search for the plugin. This is your ZIP file.

  6. Once you have selected the plugin file, click on "Install". A confirmation message will appear.

Enabling a Plugin in PowerSchool

  1. Start by selecting "System" under "Setup" in the main menu. This will take you to the System Administrator page.

  2. Under the "Server" section, click on "System Settings" to access the System Settings page.

  3. On the System Settings page, click on "Plugin Management Configuration" to access the Plugin Management Dashboard.

  4. Search for the plugin that you recently installed above.

  5. Check the box under "Enable/Disable" to enable the plugin.

Step 6: Use the Plugin

  1. Go to “Page and Data Management”

  2. Find the “Data Export” section

  3. Click, “Export Data”

  4. Choose, “Additional Data Sets”

  5. Next, in the next drop down box type “NQ”, this will show a list of user installed PowerQueries

  6. Choose the one that says “org.psugcal.example.students.birthdays”

    Connecting PowerSchool Data to Google Sheets Part 2: Install and test the PowerQuery (3)
  7. Select all the boxes on the left, and hit, “Next”, in the bottom right

    Connecting PowerSchool Data to Google Sheets Part 2: Install and test the PowerQuery (4)
  8. On the next page, click “Show Records” and check the data

    Connecting PowerSchool Data to Google Sheets Part 2: Install and test the PowerQuery (5)

    This is the end of Part 2.
    Take Me to Part 3

    Copyright © Domain Seven LLC. All rights reserved.
    For permissions to use or share any content behind our paywall, please email us at: tonydeprato@domain7.tech .

    Connecting PowerSchool Data to Google Sheets Part 2: Install and test the PowerQuery (6)

    Get more from Domain Seven Code Community in the Substack app

    Available for iOS and Android

    Leave a comment

    Share Domain Seven Code Community by Tony DePrato

Connecting PowerSchool Data to Google Sheets Part 2: Install and test the PowerQuery (2024)
Top Articles
Latest Posts
Article information

Author: Nicola Considine CPA

Last Updated:

Views: 5947

Rating: 4.9 / 5 (49 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Nicola Considine CPA

Birthday: 1993-02-26

Address: 3809 Clinton Inlet, East Aleisha, UT 46318-2392

Phone: +2681424145499

Job: Government Technician

Hobby: Calligraphy, Lego building, Worldbuilding, Shooting, Bird watching, Shopping, Cooking

Introduction: My name is Nicola Considine CPA, I am a determined, witty, powerful, brainy, open, smiling, proud person who loves writing and wants to share my knowledge and understanding with you.