Spark is NOT:
- just a SQL engine
- just a query engine
Spark IS:
A general-purpose distributed data processing engine capable of ETL, analytics, and machine learning.
| Original Text (on page) | Issue | Suggested Correction |
|---|---|---|
| “List sroted pods” | Typo | “List sorted pods” |
| “List pods using a different output” | Wording unclear | Could be: “List pods with different output formats” |
| “View all cotainers logs…” | Typo | “View all containers logs…” |
| “locahost-port” | Typo | “localhost-port” |
| “hosts-port” | Wording | Better: “host-port” |
| **“ |
| flowchart TD | |
| %% ============================= | |
| %% Global Layout Tweaks | |
| %% ============================= | |
| %% Make arrows thicker and more visible | |
| linkStyle default stroke-width:2px,stroke:#555,opacity:0.9; | |
| -- CREATE EXTENSION IF NOT EXISTS postgis; | |
| -- CREATE EXTENSION IF NOT EXISTS pgvector; | |
| ------------------------------ Exercise 1 ------------------------------ | |
| -- Table setup | |
| CREATE TABLE products ( | |
| id SERIAL PRIMARY KEY, | |
| sku VARCHAR(20) UNIQUE, | |
| name VARCHAR(200), | |
| category VARCHAR(50), |
| Search Type | Speed | Accuracy | Flexibility | Storage | Best For |
|---|---|---|---|---|---|
| Exact Match | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐ | ⭐⭐⭐⭐⭐ | IDs, codes, filters |
| Pattern Match | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ | Autocomplete, prefixes |
| Full-Text | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ | Documents, articles |
| Vector / Semantic | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐ | Recommendations, concepts |
| Fuzzy | ⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ | Typos, data cleaning |
| Scenario | Best Choice | Alternative / Avoid |
|---|---|---|
| User login/auth | Exact Match | All others |
| Product SKU lookup | Exact Match | All others |
| Autocomplete | Pattern Match (prefix) | Fuzzy, Vector |
| Blog search | Full-Text | Vector + Full-Text, Pattern |
| Recommendation | Vector + Full-Text | Pattern |
| Exact Data with typos | Fuzzy | Pattern, Exact |
| Multi-language content | Vector + Full-Text | Pattern |
| Real-time search | Exact / Pattern | Full-Text, Vector |