Skip to content

procedure

  1. open argenta webapp
    transactions zoeken > define period > download (dit zal xlsx files genereren)
  2. open xlsx in libre office calc
    save as text(csv) ; gebruik {tab} als delimitter ! (zie verderop bij import
    move xlxs & csv file naar : /mnt/data/doc/1-admin/bank/Argenta/uittreksels/
  3. import de csv in de sqlite3 Argenta db , zie hieronder

create a db

with cli

cd  /mnt/data/doc/1-admin/bank/Argenta/uittreksels/transactions-transformed
# will create a db if not exist , else will open it
sqlite ./Argenta 

import transactions

try 1
.import ./BE13973433968839__2022.csv transactions

=> geen error , maar reslutaat is 1 enkle column per row met alle data erin , geen conversie naar table
delete existing table , retry

try 2
.mode csv
.import ./BE13973433968839__2022.csv transactions

=> /BE13973433968839__2022.csv:1: unescaped ” character
csv file : er is geen eind “” kolom , indien er geen data (null) is voor die colom ( hetgeen blijkbaar een csv conventie is
maar dat verklaart de foutmelding niet )
( comment : that will not strip out the double-quotes surrounding your data; they are considered part of your data.)

try 3
.mode ascii
.separator ";" "\n"
.import ./BE13973433968839__2022.csv transactions

=> ./BE13973433968839__2022.csv:34: INSERT failed: no such table: transactions
./BE13973433968839__2022.csv:35: expected 1 columns but found 11 - extras ignored => .separator “\t” “\n”

FINAL import syntax

re-export csv in Calc app using tab seperator and no text delimittor
use these 3 commands immediatly after each other , otherwise it will not work

.mode csv
.separator "\t" "\n"
.import ./BE13973433968839__2022.csv transacactions_import

result will be text

final table

copy from import table into final table : proper date columns & identity PK column
sqlite doesn’t have conventional datatypes ,
but dataclasses ( text , number, datetime)
it does auto conversion to and from memory / disk