Tumblr

把那 5000 多万条企业数据放到 SQLite 数据库里

  •  
  •   Tumblr · Jun 10, 2019 · 3680 views
    This topic created in 2543 days ago, the information mentioned may be changed or developed.

    至于是哪 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 replies    2019-06-13 00:18:18 +08:00
    fange01
        1
    fange01  
       Jun 13, 2019
    装进去干嘛?趁着夏天发酵吗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5844 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 02:57 · PVG 10:57 · LAX 19:57 · JFK 22:57
    ♥ Do have faith in what you're doing.