Description
Introduction
This training provides a comprehensive, hands-on introduction to working with core data structures in q, the query language of kdb+. Tables, lists, and dictionaries form the foundation of data manipulation in q, especially in high-performance and time-series environments.
Participants will learn how to create, transform, query, and optimize these structures efficiently. The course focuses on practical use cases relevant to financial data, real-time analytics, and large-scale data processing, enabling learners to confidently build and manipulate in-memory and on-disk datasets.
By the end of the training, participants will understand how q’s columnar architecture and vector-based operations deliver powerful performance advantages.
Prerequisites
- Basic understanding of programming concepts (variables, functions, data types)
- Familiarity with database fundamentals (rows, columns, keys, joins)
- Introductory knowledge of q syntax
- Basic understanding of time-series data concepts (helpful for applied examples)
Table of Contents
Module 1: Foundations of q Data Structures
- Overview of q data types
- Atoms vs Lists
- Type system and type casting
- Nulls and infinities in q
- Memory model basics
Module 2: Working with Lists
- Creating simple and typed lists
- Numeric, symbol, temporal, and mixed lists
- Indexing and slicing
- List operations and vectorized computation
- Functional operations on lists
- Performance considerations with large lists
Module 3: Dictionaries in q
- Creating dictionaries
- Key-value mapping fundamentals
- Accessing and updating dictionary values
- Enumerations and symbol handling
- Nested dictionaries
- Using dictionaries in real-world scenarios
Module 4: Introduction to Tables
- Tables as flipped dictionaries
- Creating tables manually
- Loading tables from data
- Column types and metadata
- Viewing and inspecting table structure
Module 5: Querying Tables
- Select queries in q
- Where clauses and filtering
- Aggregations and grouping
- Ordering and sorting
- Limiting and distinct queries
- Functional form vs SQL-like form
Module 6: Keyed Tables
- Creating keyed tables
- Primary keys and uniqueness
- Updating keyed tables
- Upserts and merges
- Differences between keyed and unkeyed tables
Module 7: Table Transformations
- Adding and deleting columns
- Updating rows
- Joining tables (aj, lj, ij, etc.)
- Pivoting and reshaping data
- Working with temporal joins
Module 8: Performance & Best Practices
- Columnar storage principles
- In-memory vs on-disk tables
- Efficient filtering and grouping
- Avoiding common performance pitfalls
- Optimizing large datasets
Module 9: Real-World Hands-On Exercises
- Building a trade & quote table
- Aggregating market data
- Creating keyed lookup dictionaries
- Designing a small in-memory analytics pipeline







Reviews
There are no reviews yet.