Import data from TSV file to PostgreSQL without programming

by

Want to import data from TSV file to PostgreSQL ?

Using FileToDB, a native GUI tool, you can import data from TSV file to PostgreSQL easily and fast.

  • Step by step, just a few mouse clicks.
  • Avoid uploading big TSV file(s) to online services.
  • Support large TSV files (big than 4GB).
  • Support Windows, Linux, macOS.

Download FileToDB Download FileToDB

Here’s how to.

Example of importing TSV to PostgreSQL

Example source TSV file

Import Data From TSV File To PostgreSQL  - source TSV file

After converting, data in PostgreSQL table

Import Data From TSV File To PostgreSQL  - view data

Import data from TSV file to PostgreSQL

Choose PostgreSQL and logon.

load TSV data to PostgreSQL  table - Choose PostgreSQL and logon

Click “Wizard – 1 File To 1 Table” at task dialog.

import TSV data to PostgreSQL  table - task window

Select the “TSV” file type.

Import TSV file data to PostgreSQL table - select file type

then show the wizard.

1. Open a TSV file.

Import Data From TSV File To PostgreSQL  - open TSV file

Support multiple TSV file encodings: ANSI, UTF-8, UTF-8BOM, UCS-2LE (Unicode Little Endian), UCS-2BE (Unicode Big Endian), CP1250 (Central European), CP1251 (Cyrillic), CP1252 (Western European), CP1253 (Greek), CP1254 (Turkish ), CP1255 (Hebrew), CP1256 (Arabic), CP1257 (Baltic), CP1258 (Vietnamese), CP437 (United States), CP850 (Western European), CP852 (Central European), CP866 (Cyrillic), CP874 (Thai), CP932 (Japanese), CP936 (Chinese Simplified), CP949 (Korean), CP950 (Chinese Traditional), ISO-8859-1 (Western European), ISO-8859-2 (Central European), ISO-8859-15 (Latin 9), KOI-8 (Cyrillic), Macintosh (Western European).

2. Select a PostgreSQL table and config fields.

Load Data From TSV File To PostgreSQL  - select table

3. Preview data.

Transfer Data From TSV File To PostgreSQL  - preview

4. Import TSV data to PostgreSQL.

Import Data From TSV File To PostgreSQL  - import data

View imported data in PostgreSQL table

Load Data From TSV File To PostgreSQL  - view data

Save/load session of importing TSV to PostgreSQL

You can save/load session to run “TSV to PostgreSQL” conversion repeatly.

1.Save Session.

Click “Save Session” button, then enter a session file name.

TSV to PostgreSQL - save session

click “OK” button.

2.Load Session.

Click the “Open a Saved Session” in task window, select a session file.

TSV to PostgreSQL - load session

then show the wizard form, click a few “Next” to import TSV to PostgreSQL.

TSV to PostgreSQL - start session

Run in command line for importing TSV to PostgreSQL

You can run “TSV to PostgreSQL” conversion in command line.

When you save session, you can click “Save & Make Batch File”.

TSV to PostgreSQL - save session

The “Save & Make Batch File” form shows.

TSV to PostgreSQL - create batch file

Click “OK” button, you’ll create a batch file, in Windows, like this:

C:
cd "C:\Users\pansh\AppData\Local\Programs\FileToDB"
FileToDB task="C:\Users\pansh\Documents\test.ldr" logfile="C:\Users\pansh\Documents\test.log"

You can run this batch file in command line.

Run as scheduled task for importing TSV to PostgreSQL

You can run “TSV to PostgreSQL” conversion automatically at specific time.

On Linux/macOS, you can use Crontab.

For macOS, How to Fix Cron Permission Issues in macOS.

On Windows, in “Save & Make Batch File” form, you can click “Create & Schedule Task” to set a scheduled task.

TSV to PostgreSQL - create batch file

And then, with scheduled task wizard, step by step.

TSV to PostgreSQL - scheduled task application

TSV to PostgreSQL - scheduled task name

TSV to PostgreSQL - scheduled task time

TSV to PostgreSQL - scheduled task user

TSV to PostgreSQL - scheduled task information

You’ll see created task listed in scheduled task list.

scheduled task list

Download

Here you can download FileToDB, and buy FileToDB.

Download FileToDB Download FileToDB