---
name: "apop_text_to_db"
section: "1"
platform: "linux"
package: "apophenia-bin"
version: "1.0+ds-10"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/apop_text_to_db"
---

# apop\_text\_to\_db(1)

command line utility to convert a text file into a database table

## NAME

apop\_text\_to\_db - command line utility to convert a text file into a database table

## SYNOPSIS

**apop\_text\_to\_db** \[*-d delimiters*\] *text\_file table\_name dbname*

## DESCRIPTION

If the input text file name is a single dash, -, then read from STDIN. Input must be plain ASCII or UTF-8.

- **-d**

  the single-character delimiters to use, e.g., **-d** " ," or **-d** "\\t" (which you will almost certainly have to write as **-d** "\\\\t") (default: "\|,\\t", meaning that any of a pipe, comma, or tab will delimit separate entries)

- **-nc**

  data does not include column names

- **-n** regex

  case-insensitive regular expression indicating Null values (default: NaN)

- **-m**

  use a MySQL database (default: SQLite)

- **-f**

  fixed width field ends: **-f**"3,8,12,17" (first char is one, not zero)

- **-u**

  mysql username

- **-p**

  mysql password

- **-r**

  data includes row names

- **-v**

  verbosity

- **-N**

  a comma-separated list of column names: **-N**"apple,banana,carrot,durian"

- **-en**

  if table exists, do nothing and exit

- **-ed**

  if table exists, retain the table, delete all data, refill with the new data (i.e., call 'delete \* from your\_table')

- **-eo**

  if table exists, overwrite the table from scratch (deleting the previous table entirely)

- **-ea**

  if table exists, append new data to the existing table

- **-h**

  display this help and exit
