Description
Introduction
This training provides a deep dive into the core building blocks of the q language, the powerful vector programming language of kdb+. Understanding data types and functional programming concepts in q is essential for writing efficient, high-performance, and scalable analytics—especially in time-series and real-time environments.
Participants will learn how q handles atomic and complex data types, lists, dictionaries, tables, and keyed tables, followed by mastering q’s functional paradigm including lambdas, projections, adverbs, and higher-order functions. The course emphasizes practical exercises and real-world use cases relevant to financial data analytics, large-scale data processing, and streaming environments.
By the end of this training, learners will confidently manipulate data structures and write elegant, concise, and high-performance functional code in q.
Prerequisites
- Basic understanding of programming concepts
- Familiarity with databases or data structures
- Prior exposure to q fundamentals (recommended but not mandatory)
- Basic knowledge of command-line usage
- Understanding of vectorized programming concepts (helpful)
Table of Contents
Module 1: Overview of q & kdb+ Architecture
- Introduction to q language
- q console and development environment
- Relationship between q and k
- Overview of kdb+ data model
Module 2: q Data Types – Fundamentals
- Atomic data types
- Boolean
- Byte
- Short
- Int
- Long
- Real & Float
- Char & Symbol
- Date, Time, Timestamp types
- Type codes and type introspection
- Null values and infinities
- Type casting and conversions
Module 3: Lists and Vector Programming
- Homogeneous vs heterogeneous lists
- List creation and manipulation
- Indexing and slicing
- Enumeration
- Implicit iteration
- Vector operations and performance advantages
Module 4: Dictionaries & Tables
- Creating dictionaries
- Dictionary operations
- Tables as flipped dictionaries
- Keyed tables
- Column operations
- Metadata inspection
Module 5: Functions in q
- Defining functions
- Lambda expressions
- Local and global scope
- Function arguments and return values
- Implicit return behavior
- Conditional logic inside functions
Module 6: Functional Programming Concepts
- Functions as first-class objects
- Projections and partial application
- Higher-order functions
- Composition
- Each, Over, Scan
- Adverbs (
each,over,scan,prior,peach) - Iterators and functional patterns
Module 7: Advanced Functional Techniques
- Dynamic function generation
- Functional form of queries
- Using parse trees
- Functional updates on tables
- Error handling in functional style
Module 8: Performance & Best Practices
- Vectorization vs loops
- Memory efficiency considerations
- Avoiding common pitfalls
- Writing idiomatic q code
- Debugging functional code







Reviews
There are no reviews yet.