Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


'csvimport'

...

and 'csvexport'

...

are tools used to import/export

...

CSV 파일에 대해서 machloader 를 이용하여 보다 간단하게 사용할 수 있도록 옵션을 단순화하였다.

아래 기술된 Option이외에도 machloader에서 사용할 수 있는 옵션을 모두 사용 가능하다.

csvimport

csvimport를 이용하면 쉽게 CSV 파일을 서버에 입력할 수 있다.

기본 사용법

...

CSV files to the Machbase server.

The options have been simplified for simpler use of the CSV file using the machloader.

In addition to the options described below, all options available in machloader are available.

csvimport

CSV files can be easily entered into the server using csvimport.

Basic Usage

Enter the table name and data file name according to the following options.

Option:

Code Block
-t: table 테이블명name 지정specification 옵션option
-d: 데이터data 파일명file 지정naming 옵션options
* 옵션을 지정하지 않고 테이블명과 데이터 파일명만으로도 수행할 수 있다 You can do this with just the table name and data file name without specifying the option.


Example:

Code Block
csvimport -t table_name -d table_name.csv
csvimport table_name file_path 
csvimport file_path table_name


CSV

...

Header Exception

Use the following option to enter the CSV file except for the header at the time of input.

Option:

Code Block
-H: csv 파일의 첫번째 라인을 헤더로 인식하고 입력하지 않는다 Will not recognize the first line of the csv file as a header.


Example:

Code Block
csvimport -t table_name -d table_name.csv -H

테이블 자동 생성

...

Automatic Table Creation

If a table is not created to be entered at the time of input, the table can be created at the same time through the following options.

Option:

Code Block
-C: Automatically import할creates the 테이블을table 자동during 생성한다. 칼럼명은import. Column names are automatically created as c0, c1, .... 자동으로The 생성된다.created 생성되는column 칼럼은is varchar (32767) 타입이다type.
-H: Creates column import할name with csv header 헤더명으로name 칼럼명을during 생성한다import.


Example:

Code Block
csvimport -t table_name -d table_name.csv -C
csvimport -t table_name -d table_name.csv -C -H


csvexport

The database table data can be easily exported to the CSV file with 'csvexport'로 데이터베이스 테이블 데이터를 CSV 파일로 쉽게 export할 수 있다.

...

Basic Usage

Option:

Code Block
-t: table 테이블명name 지정specification 옵션option
-d: 데이터data 파일명file 지정naming 옵션options
* 옵션을 지정하지 않고 테이블명과 데이터 파일명만으로도 수행할 수 있다 You can do this with just the table name and data file name without specifying the option.

Example:

Code Block
csvexport -t table_name -d table_name.csv
csvexport table_name file_path 
csvexport file_path table_name

Using CSV

...

Header

With the following option, you can add a header to the CSV file to be exported with a column name.

Option:

Code Block
-H: 테이블 칼럼명으로 csv 파일의 헤더를 생성한다 Creates the header of the csv file with the table column name.

Example:

Code Block
csvexport -t table_name -d table_name.csv -H

...