@@ -28,17 +28,17 @@ PPL query::
28
28
29
29
os> source=expand_flatten | expand teams | fields city, teams.name
30
30
fetched rows / total rows = 7/7
31
- +--------------+-------------------- +
32
- | city | teams.name |
33
- |--------------+-------------------- |
34
- | Seattle | Seattle Seahawks |
35
- | Seattle | Seattle Kraken |
36
- | Vancouver | Vancouver Canucks |
37
- | Vancouver | BC Lions |
38
- | San Antonio | San Antonio Spurs |
39
- | Null City | null |
40
- | Missing City | null |
41
- +--------------+-------------------- +
31
+ +--------------+-------------------+
32
+ | city | teams.name |
33
+ |--------------+-------------------|
34
+ | Seattle | Seattle Seahawks |
35
+ | Seattle | Seattle Kraken |
36
+ | Vancouver | Vancouver Canucks |
37
+ | Vancouver | BC Lions |
38
+ | San Antonio | San Antonio Spurs |
39
+ | Null City | null |
40
+ | Missing City | null |
41
+ +--------------+-------------------+
42
42
43
43
Example 2: Expand a nested field
44
44
=================================
@@ -47,15 +47,15 @@ PPL query::
47
47
48
48
os> source=expand_flatten | where city = 'San Antonio' | expand teams.title | fields teams.name, teams.title
49
49
fetched rows / total rows = 5/5
50
- +-------------------+-------------- +
51
- | teams.name | teams.title |
52
- |-------------------+-------------- |
53
- | San Antonio Spurs | 1999 |
54
- | San Antonio Spurs | 2003 |
55
- | San Antonio Spurs | 2005 |
56
- | San Antonio Spurs | 2007 |
57
- | San Antonio Spurs | 2014 |
58
- +-------------------+-------------- +
50
+ +-------------------+-------------+
51
+ | teams.name | teams.title |
52
+ |-------------------+-------------|
53
+ | San Antonio Spurs | 1999 |
54
+ | San Antonio Spurs | 2003 |
55
+ | San Antonio Spurs | 2005 |
56
+ | San Antonio Spurs | 2007 |
57
+ | San Antonio Spurs | 2014 |
58
+ +-------------------+-------------+
59
59
60
60
Example 3: Expand multiple fields
61
61
==================================
@@ -64,26 +64,26 @@ PPL query::
64
64
65
65
os> source=expand_flatten | expand teams | expand teams.title | fields teams.name, teams.title
66
66
fetched rows / total rows = 16/16
67
- +-------------------+-------------- +
68
- | teams.name | teams.title |
69
- |-------------------+-------------- |
70
- | Seattle Seahawks | 2014 |
71
- | Seattle Kraken | null |
72
- | Vancouver Canucks | null |
73
- | BC Lions | 1964 |
74
- | BC Lions | 1985 |
75
- | BC Lions | 1994 |
76
- | BC Lions | 2000 |
77
- | BC Lions | 2006 |
78
- | BC Lions | 2011 |
79
- | San Antonio Spurs | 1999 |
80
- | San Antonio Spurs | 2003 |
81
- | San Antonio Spurs | 2005 |
82
- | San Antonio Spurs | 2007 |
83
- | San Antonio Spurs | 2014 |
84
- | null | null |
85
- | null | null |
86
- +-------------------+-------------- +
67
+ +-------------------+-------------+
68
+ | teams.name | teams.title |
69
+ |-------------------+-------------|
70
+ | Seattle Seahawks | 2014 |
71
+ | Seattle Kraken | null |
72
+ | Vancouver Canucks | null |
73
+ | BC Lions | 1964 |
74
+ | BC Lions | 1985 |
75
+ | BC Lions | 1994 |
76
+ | BC Lions | 2000 |
77
+ | BC Lions | 2006 |
78
+ | BC Lions | 2011 |
79
+ | San Antonio Spurs | 1999 |
80
+ | San Antonio Spurs | 2003 |
81
+ | San Antonio Spurs | 2005 |
82
+ | San Antonio Spurs | 2007 |
83
+ | San Antonio Spurs | 2014 |
84
+ | null | null |
85
+ | null | null |
86
+ +-------------------+-------------+
87
87
88
88
Example 4: Expand and flatten a field
89
89
=====================================
0 commit comments