@@ -22,6 +22,7 @@ All Countries, States & Cities are Covered & Populated with Different Combinatio
22
22
- [ Insights] ( #insights )
23
23
- [ Next API Database Update] ( #next-api-database-update )
24
24
- [ Import MongoDB] ( #import-mongodb )
25
+ - [ Export to DuckDB] ( #export-to-duckdb )
25
26
- [ License] ( #license )
26
27
- [ Contributing] ( #contributing )
27
28
- [ Repo Activity] ( #repo-activity )
@@ -76,25 +77,27 @@ Perfect for developers, researchers, and businesses who need clean, structured g
76
77
- MYSQL
77
78
- PSQL
78
79
- SQLITE
79
- - DUCKDB
80
80
- SQLSERVER
81
81
- MONGODB
82
82
- XML
83
83
- YAML
84
84
- CSV
85
85
86
+ ** Note:** DuckDB format is available via manual conversion from SQLite files. See the [ Export to DuckDB] ( #export-to-duckdb ) section for instructions.
87
+
86
88
## Distribution Files Info
87
89
88
- | File | JSON | MYSQL | PSQL | SQLITE | DUCKDB | SQLSERVER | MONGODB | XML | YAML | CSV |
89
- | :------------------------- | :--- | :---- | :--- | :----- | :----- | :-------- | :------ | :-- | :--- | :-- |
90
- | Regions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
91
- | Subregions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
92
- | Countries | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
93
- | States | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
94
- | Cities | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
95
- | Country+States | ✅ | NA | NA | NA | NA | NA | NA | NA | NA | NA |
96
- | Country+Cities | ✅ | NA | NA | NA | NA | NA | NA | NA | NA | NA |
97
- | Country+State+Cities/World | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | NA | NA | NA |
90
+ | File | JSON | MYSQL | PSQL | SQLITE | SQLSERVER | MONGODB | XML | YAML | CSV |
91
+ | :------------------------- | :--- | :---- | :--- | :----- | :-------- | :------ | :-- | :--- | :-- |
92
+ | Regions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
93
+ | Subregions | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
94
+ | Countries | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
95
+ | States | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
96
+ | Cities | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
97
+ | Country+States | ✅ | NA | NA | NA | NA | NA | NA | NA | NA |
98
+ | Country+Cities | ✅ | NA | NA | NA | NA | NA | NA | NA | NA |
99
+ | Country+State+Cities/World | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | NA | NA | NA |
100
+
98
101
99
102
## Demo
100
103
@@ -132,6 +135,35 @@ tar -xzvf world-mongodb-dump.tar.gz
132
135
mongorestore --host localhost:27017 --db world mongodb-dump/world
133
136
```
134
137
138
+ ## Export to DuckDB
139
+
140
+ Want to export the database to DuckDB format? You can easily convert the existing SQLite files to DuckDB format using our conversion script.
141
+
142
+ ### Prerequisites
143
+
144
+ First, install DuckDB Python package:
145
+
146
+ ``` bash
147
+ pip install duckdb
148
+ ```
149
+
150
+ ### Convert SQLite to DuckDB
151
+
152
+ Use the provided conversion script to convert SQLite files to DuckDB format:
153
+
154
+ ``` bash
155
+ # Convert the complete world database
156
+ python3 bin/import_duckdb.py --input sqlite/world.sqlite3 --output duckdb/world.db
157
+
158
+ # Convert individual table databases
159
+ python3 bin/import_duckdb.py --input sqlite/regions.sqlite3 --output duckdb/regions.db
160
+ python3 bin/import_duckdb.py --input sqlite/subregions.sqlite3 --output duckdb/subregions.db
161
+ python3 bin/import_duckdb.py --input sqlite/countries.sqlite3 --output duckdb/countries.db
162
+ python3 bin/import_duckdb.py --input sqlite/states.sqlite3 --output duckdb/states.db
163
+ python3 bin/import_duckdb.py --input sqlite/cities.sqlite3 --output duckdb/cities.db
164
+ ```
165
+
166
+ The conversion script will create DuckDB database files that maintain the same structure and data as the original SQLite files, optimized for analytical workloads.
135
167
136
168
## License
137
169
0 commit comments