Skip to content

Commit b80a47d

Browse files
committed
update styles
1 parent 4174da5 commit b80a47d

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

knowledgebase/importing-geojason-with-nested-object-array.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ DESCRIBE TABLE file('geojson.json', 'JSON')
4646

4747
3. Create a table to store the GeoJSON rows.
4848

49+
<br/>
50+
4951
The requirement here is to generate a row for each `object` in the `features array`.
5052
The data type inferred for the field `geometry` suggests that it translates to ClickHouse's **MultiPolygon** [data type](https://clickhouse.com/docs/en/sql-reference/data-types/geo#multipolygon).
5153

@@ -75,11 +77,15 @@ order by id;
7577
```
7678

7779
4. Prepare the data.
78-
79-
The main purpose of the query is to verify that we obtain one row for each **object** in the **features array**.
80+
8081
<br/>
8182

82-
> The field `features.geometry.coordinates` is commented to make the result set more readable.
83+
The main purpose of the query is to verify that we obtain one row for each **object** in the **features array**.
84+
85+
86+
:::note
87+
The field `features.geometry.coordinates` is commented to make the result set more readable.
88+
:::
8389

8490
```sql
8591
SELECT
@@ -115,6 +121,8 @@ LIMIT 5
115121

116122
5. Insert the data.
117123

124+
<br/>
125+
118126
```sql
119127
INSERT INTO geojson
120128
SELECT
@@ -150,6 +158,8 @@ This is caused by the parsing of `features.geometry.coordinates`.
150158

151159
6. Let's check its data type.
152160

161+
<br/>
162+
153163
``` sql
154164
SELECT DISTINCT toTypeName(features.geometry.coordinates) AS geometry
155165
FROM file('municipios_ign.geojson', 'JSON')
@@ -183,6 +193,8 @@ ARRAY JOIN features;
183193

184194
7. Insert the data.
185195

196+
<br/>
197+
186198
```sql
187199
INSERT INTO geojson
188200
SELECT

0 commit comments

Comments
 (0)