0

From Linux, might there be a "native" or built-in convenient "database" facility from withing Powershell itself?

While this works fine for importing data:

nicholas@mordor:~/csv$ 
nicholas@mordor:~/csv$ ll BCCDC_COVID19_Dashboard_Lab_Information.csv 
-rw-rw-r-- 1 nicholas nicholas 89153 Nov 22 05:16 BCCDC_COVID19_Dashboard_Lab_Information.csv
nicholas@mordor:~/csv$ 
nicholas@mordor:~/csv$ pwsh
PowerShell 7.1.0
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS /home/nicholas/csv> 
PS /home/nicholas/csv> $labs=import-Csv labs.csv
PS /home/nicholas/csv> 

this was just so surprisingly simple and gives such at least human readable results:

..
Date        : 2020-11-19
Region      : Vancouver Coastal
New_Tests   : 2923
Total_Tests : 337615
Positivity  : 5.12
Turn_Around : 28.5

Date        : 2020-11-19
Region      : Vancouver Island
New_Tests   : 1682
Total_Tests : 118623
Positivity  : 1.4
Turn_Around : 12.7


PS /home/nicholas/csv> 

perhaps there's a utility even "lighter" than SQLite.

Using Linux, aside from persisting to a mainstream RDBMS such as:

  • MySQL
  • Postgres
  • SQLite

how else might data such as this be persisted?

I'm more interested in retrieving such data.

5
  • 2
    Please (re)phrase your actual question. As you answer yourself: "Import-Csv, this was just so surprisingly simple and gives such at least human readable results", so why not using that? (I can think of a few reasons, but you need to define them in your question, to get a proper answer). Commented Nov 23, 2020 at 10:26
  • I updated the question to, hopefully, address your critique. Commented Nov 23, 2020 at 12:40
  • 2
    Does it need to be a database? Or is a serialized object stored in file also sufficient? Again: explain why a surprisingly simple csv file doesn't (completely) fulfill your needs? Commented Nov 23, 2020 at 13:20
  • 1
    Yeah I have a hard time seeing what the problem is. If the CSV works perfectly as is, what's the question? Just keep it as a CSV then... Commented Nov 23, 2020 at 20:42
  • I was more interested in persistence, and was looking at New-PSDrive -- but that turns out to be impractical for Linux. Given that MSSQL isn't a realistic (?) option either. Not sure what my choices are for storage. Commented Nov 24, 2020 at 1:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.