Get the App
SLTechnology News&Howtos  ›  Database  › 

What is DMFLDR's method of dealing with field data with delimiters?

Shulou Source: shulou.com Published: 2022-05-31 13:01:53 11月15日 Update

This article introduces what is the processing method of field data with delimiters in DMFLDR. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

What if the corresponding field data in the data file to be loaded using dmfldr contains delimiters?

1. Create a test table

CREATE TABLE "SYSDBA". "TEST01"

(

"C1" VARCHAR2 (20)

C2 VARCHAR2 (20)

C3 VARCHAR2 (20)

"C4" VARCHAR2 (20) STORAGE (ON "MAIN", CLUSTERBTR)

two。 Edit data file

The test data are as follows:

1, "2", 3, 4

22, "3pr 40", 4pr 5

4556, "5", 6, 7

3. Edit control file

The editing control file test01.ctl is as follows:

OPTIONS

(

SKIP = 0

IGNORE_BATCH_ERRORS = TRUE

DIRECT = FALSE

)

LOAD DATA

INFILE'C:\ Users\ Think\ Desktop\ test01.txt'

INTO TABLE TEST01

FIELDS','

(

C1

C2 OPTIONALLY ENCLOSE BY'"'

C3

C4

)

4. Using control files to load data

D:\ dm7\ bin > dmfldr.exe userid=SYSDBA/SYSDBA@LOCALHOST:5236 CONTROL='c:\ text01.ctl'

Dmfldr V7.6.0.197-Build (2019.09.12-112648) ENT

Dmfldr:

Copyright (c) 2011, 2015, Dameng. All rights reserved.

Control file:

Rows loaded: all

Number of server rows per submission: 50000

Skip rows: 0

Number of errors allowed: 100

Whether to load directly: No

Whether to insert a self-incrementing column: No

Whether the data is sorted by clustered index: No

Character set: GBK

A total of 1 data files:

C:\ Users\ Think\ Desktop\ test01.txt

Error file: fldr.bad

Target table: TEST01

Column name wrapper data type termination

C1 CHARACTER

C2 CHARACTER

C3 CHARACTER

C4 CHARACTER

3 rows processed.

Target table: TEST01

3 lines loaded successfully.

Row 0 is discarded due to data format error.

Row 0 was not loaded due to a data error.

Total number of logical records skipped: 0

Total number of logical records read: 3

Total number of logical records rejected: 0

Usage time: 9.169 (ms)

5. Query test table data

SQL > select * from SYSDBA. "TEST01"

C1 C2 C3 C4

1 2 3 4

22 3,40 4 5

4556 56 7

As we can see, with the closure of dmfldr, the desired result can be achieved perfectly, and the field data with delimiters can be solved quickly.

About DMFLDR on the delimited field data processing method is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Data files delimiters fields errors controls totals logic tests methods processing content more goals help good success interests such as above characters Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Apple vpn Xiaomi MySQL