簡體   English   中英

wxloader使用哪些不同的參數?

[英]What are different parameter used for wxloader?

嗨,我是wx2的新手,無法獲取相應的文檔。 我需要了解可以傳遞給wxloader實用程序的參數是什么? -b-f在下面的命令中指的是什么?

wxloader -z Server_Ip -u User_name -p password -b /test/.test.err -f '|' --blank-null --trim-varchars -t "$TABLENAME"  /path_to_file 

也是為什么我們使用'|' -f之后?

根據Kognitio文檔(命令行工具)

Usage: wxloader -s <dsn> -u <user> -t <table> <filename>

轉換選項:

-F, --field-format-file <file>    File containing field format string
-w, --wcb-file                    Load WCB file
-D, --date-format <fmt>           Format of dates [YYYY-MM-DD]
-S, --timestamp-format <fmt>      Format of timestamps [YYYY-MM-DD HH:NN:SS]
-T, --time-format <fmt>           Format of times [HH:NN:SS]
    --implied-dp                  DECIMAL fields have implied decimal points
    --min-year <year>             Two-digit years are no earlier than <year>
    --null-value <str>            String to be translated to NULL
-N, --naive-delimiting            Quotes have no special meaning
-f, --field-separator <char>      Field separator character [,]
    --long-field-separator <str>  Field separator string
    --load-no-nulls               Use zero or blank for all blank fields
    --separator-terminated-values Expect a field separator after last field
    --pad-short-records           Use NULL for missing trailing fields
    --truncate-strings            Silently truncate overlong strings
    --trim-varchars               Remove trailing spaces from VARCHAR fields
    --preserve-leading-spaces     Don't trim leading spaces from fields
    --truncate-long-records       Ignore excess fields in a record
    --blank-null                  Blank strings are always NULL
    --exclude-fields 1,2,3,...    List of field numbers to exclude
    --currency-symbol <char>      Ignore this symbol before numeric fields
    --decimal-point <char>        Decimal point character if not '.'
    --thousand-separator <char>   Thousand separator character if not ','
    --quote <char>                Character to quote strings if not "
    --char-for-unknown <char>     Character to use for unimportable chars
    --int-allow-decimals          Round non-int values for int columns

如果使用-F給定格式字符串,它將覆蓋所有字段轉換選項。 如果給定-w,則忽略字段轉換選項。

記錄級轉換選項:

   --record-terminator <char>    Record terminator character [\n]
    --record-type <type>          Type of record, default auto
    Valid record types are:
        term    terminated by record terminator, no quoted strings
        qterm   terminated by record terminator, quotes surround strings
        fixed   fixed-width records, must specify --record-width
        auto    discern record type from format string/column types
    --record-width <width>         Size of fixed-width record in characters

文件級轉換選項:

-c, --character-set <charset>     Character set of input file
    --file-start-offset <n>       Skip <n> bytes at start of file
    --skip-records <n>            Skip <n> records at start of file
    --max-records <n>             Load no more than <n> records

報告選項:

-v, --verbose                     More commentary
-q, --quiet                       Less commentary
-b, --bad-records-file <file>     Destination for rejected records
    --log-file <file>             Output to file
    --max-conversion-errors <n>   Stop on more than <n> conversion errors
-P, --show-progress               Show progress indicator (default)
    --no-progress                 No progress indicator (default if -q)
    --progress-interval-records n Update progress count every <n> records
    --progress-interval-bytes n   Update progress count every <n> bytes
    --progress-interval-seconds n Update progress count every <n> seconds
    --show-timings                Show timing information

行為選項:

-t, --table <name>                Destination table [required]
-d, --truncate-table              Truncate table before import
    --no-statistics               Don't update table statistics after import
    --use-checksums               Use checksums on data blocks
    --no-checksums                Don't use checksums (default)

就你而言

wxloader -z Server_Ip -u User_name -p password -b /test/.test.err -f '|' --blank-null --trim-varchars -t "$TABLENAME"  /path_to_file 

您嘗試連接到服務器,然后將表導出到管道分隔文件中。

-f用於字段分隔符和| 只不過是實際的字段分隔字符串

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM