# Text File

## 아이템 블록

TXT 파일이나 CSV 파일에 데이터를 등록하는 아이템 블록입니다. 데이터를 등록하는 방법은 **갱신하기, 이어쓰기, 키 매칭** 의 방법이 있습니다.

<figure><img src="/files/3RgkRQIHQKm36jcUIBq9" alt=""><figcaption></figcaption></figure>

## 설정 팝업

<figure><img src="/files/4XDLYX1UWwjpgKdQHHt1" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/svnhdKbGzKEQUJzHIaCr" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/uNMB5ThJdhdrtBs512OS" alt=""><figcaption></figcaption></figure>

## 설정 필드

### <mark style="color:blue;">쓰기방식 : 갱신하기</mark>

항상 새로운 데이터로 파일을 갱신합니다.

#### **Target Text File**

생성하고자 하는 파일이 이름을 입력하고, 파일의 타입 csv/txt 을 선택하신 후에 링크생성 버튼을 클릭하세요. 서버에 비어있는 파일을 생성하고, 설정팝업 화면에는 다운로드 링크가 제공됩니다.

#### **입력 Data 지정**

생성된 파일에 등록 할 데이터를 지정합니다. 지정 된 데이터가 텍스트 데이터이거나 Map 데이터인 경우에는 COLUMN과 ROW 로 이루어진 정형화된 데이터가 아닌 텍스트 형태로 파일에 쓰기가 됩니다. 그러나 \[\[col1, col2, col3],\[col1, col2, col3],\[col1, col2, col3]] 형태의 배열인 경우에는 정형화된 데이터로 등록이 됩니다.

파일의 타입이 txt 인 경우 컬럼을 <mark style="color:red;">탭</mark>으로 구분하여 저장하고, csv 인 경우에는 <mark style="color:orange;">","</mark> 로 구분하여 저장됩니다.

### <mark style="color:blue;">쓰기방식 : 이어쓰기</mark>

존재하는 데이터에 줄바꿈 하여 새로운 데이터를 추가합니다.

#### **Target Text File(생략)**

#### **입력 Data 지정(생략)**

### <mark style="color:blue;">쓰기방식 : 키 매칭</mark>

현재S존재하는heet 키 컬럼의 값과 새로운매데이터의핑 키 컬럼 Index 의 값을 비교하여, Sheet 키 컬럼과 같은 ROW 에 새로운 데이터의 ROW 를 추가합니다.

#### **Target Text File(생략)**

#### Sheet 키 컬럼

새롭게 만들어진 데이터와 비교되어 질 원본 데이터의 컬럼을 의미합니다.&#x20;

#### 삽입 위치 컬럼

Sheet 키 컬럼의 데이터와 일치하는 새로운 데이터의 ROW 를 등록할 때, 삽입 위치 컬럼 위치에서 부터 등록합니다.

#### **입력 Data 지정(생략)**

#### 매핑 키 컬럼 Index

Sheet 키 컬럼과 비교할 새롭게 만들어진 데이터의 컬럼 Index 입니다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apidrag.com/base-control/output-data/text-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
