-1

I have an Access database file and I need to convert it into delimited file format. The Access DB file has multiple tables and I need to create separate delimited files for each table.

So far I am not able to parse Access DB files with any Unix commands. Is there some way that I can do this on Unix?

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418
navku
  • 192
  • 3
  • 8
  • 22
  • We need a question (there is no question yet). Please see [ask] and include what you have tried so far, or what you have researched. – Pᴇʜ Oct 30 '19 at 10:54

1 Answers1

1

You can use UCanAccess to dump Access tables to CSV files using the console utility:

gord@xubuntu64-nbk1:~/Downloads/UCanAccess$ ./console.sh
/home/gord/Downloads/UCanAccess
Please, enter the full path to the access file (.mdb or .accdb): /home/gord/ClientData.accdb
Loaded Tables:
Clients
Loaded Queries:

Loaded Procedures:

Loaded Indexes:
Primary Key  on Clients Columns: (ID) 

UCanAccess>
Copyright (c) 2019 Marco Amadei
UCanAccess version 4.0.4
You are connected!! 
Type quit to exit 

Commands end with ; 

Use:   
   export [--help] [--bom] [-d <delimiter>] [-t <table>] [--big_query_schema <pathToSchemaFile>] [--newlines] <pathToCsv>;
for exporting the result set from the last executed query or a specific table into a .csv file

UCanAccess>export -d , -t Clients clientdata.csv;
UCanAccess>Created CSV file: /home/gord/Downloads/UCanAccess/clientdata.csv

UCanAccess>quit
Cheers! Thank you for using the UCanAccess JDBC Driver.
gord@xubuntu64-nbk1:~/Downloads/UCanAccess$
gord@xubuntu64-nbk1:~/Downloads/UCanAccess$ cat clientdata.csv 
ID,LastName,FirstName,DOB
1,Thompson,Gord,2017-04-01 07:06:27
2,Loblaw,Bob,1966-09-12 16:03:00
Gord Thompson
  • 116,920
  • 32
  • 215
  • 418