至于是哪 5000 多万条,自己去找吧。
需要先安装 PSSQLite 模块,具体可以参考用 PowerShell 玩转 SQLite 数据库
Import-Module PSSQLite
$ent_codes_db = "D:\Scripts\DB\ent_codes.sqlite"
$query = "INSERT INTO ent_codes VALUES (@name, @code, @regday, @character, @legalr, @capital, @bscope, @prov, @city, @addr)"
Get-ChildItem D:\Downloads\json\ -Recurse -File | % {
(Get-Content $_.fullname | ConvertFrom-Json).erDataList | % {
$name = $_.name
$code = $_.code
$regday = $_.registrationDay
$character = $_.character
$legalr = $_.legalRepresentative
$capital = $_.capital
$bscope = $_.businessScope
$prov = $_.province
$city = $_.city
$addr = $_.address
Invoke-SqliteQuery -DataSource $ent_codes_db -Query $query -SqlParameters @{
name = $name
code = $code
regday = $regday
character = $character
legalr = $legalr
capital = $capital
bscope = $bscope
prov = $prov
city = $city
addr = $addr
}
}
}
1
fange01 2019-06-13 00:18:18 +08:00
装进去干嘛?趁着夏天发酵吗
|