Using Databases & Scripting in Projects
Course Overview
Take your existing SQL and Python knowledge and use it in Ignition. In this class students will create project resources built around existing database data. Design bi-directional data displays, process JSON objects, and use complex Perspective components while exploring error handling. Students will work with multiple data sets to focus on understanding the data and creating useful Ignition resources based on it. By the end of this class, students will be able to enhance existing displays, design projects to modify SQL databases while maintaining data integrity, and plan scalable scripting/SQL strategies.
Length: 4 days
Who Is This Class For? What Are the Class Expectations?
This class is for those that can read and write basic SQL queries or basic programs in Python or other object-oriented programming languages and want to integrate these skills directly into their Ignition Project design.
This is a Level 2 class, prior experience with Ignition is required and Core Certification is recommended.
Suggested Class Pre-Requisites:
- Working knowledge of SQL and Python languages, or completing the Level 1 DB&S class.
- Completed Inductive University.
Topics Covered
Intermediate SQL and Python
- Design Complex Queries For Tailored Result Sets
Managing Sets of Linked Database Tables
- Classify the Relationship Between Key Columns in Different SQL Tables to Query and Update Your Database While Maintaining Data Integrity
Data Transformation
- Develop Scripts to Transform Query Data Into Perspective Object Properties
Error Handling
- Implement Error Handling Techniques to Write Scripts That Respond to and Recover From Errors
Component Events
- Fine-Tune the User Experience and Control Exactly How Data is Queried and Updated Using Component Events to Write Scripts That Add Enhanced Features and Functionality to Your Applications.
Importing Python libraries
- Import Third-Party Python 2 Libraries to Extend Ignition's Built-In Scripting Functions
Working With Complex Components
- Write SQL Queries and Python Scripts to Generate Sets of Complex Objects to Dynamically Populate Perspective Properties
Processing and Generating Complex Objects
- Write Scripts That Interact With Members and Methods of Complex Objects
Custom Gateway Logging
- Add System Functions to Scripts to Write to the Gateway Wrapper Logs With Information, Warning, or Error Logs
Find and Read Existing Documentation
- Identify and Effectively Implement Information From Public Documentation on Ignition Concepts, SQL & Python Syntax, and Other Systems
Project Scripting Library
- Create Project-Global Functions and Objects To Use Across All Project Scripts
Batch Inserts
- Improve Efficiency By Planning and Building Mechanisms To Control Batch Inserts to the Database
Message Sending & Component Message Handlers
- Synchronize Data Flow and Displays Across a Session or Across Multiple Sessions With Component Message Handlers
Value Change Scripts
- Run Specific Instructions When the Value of a Property Changes