Skip to content

Commit

Permalink
better description.
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydtabb authored Oct 6, 2023
1 parent 05c7c0d commit ec9a3e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion patterns/unnest_data.malloynb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
>>>markdown
# Unnesting Data
Malloy can naturally read unnested data. Currently there is no mechanism to join something that unnest so for now you have to do it in SQL
Malloy can naturally read array data when it is in a source. Currently there is no mechanism to join an array in the Malloy language so we can drop into to SQL to do this.

In the source below we add a column that is based on the `SPLIT` function that returns an array. When Malloy looks at the SQL for this query, it sees an array and adds as a nested join. In this case we are looking at the words that appear in the 'CITY' column.

SQL is optimized so if this column isn't used in a subsequent query, it is not computed.
>>>malloy
source: airports is duckdb.sql("""
SELECT
Expand Down

0 comments on commit ec9a3e6

Please sign in to comment.