首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >wxloader使用的不同参数是什么?

wxloader使用的不同参数是什么?
EN

Stack Overflow用户
提问于 2014-07-29 10:34:20
回答 1查看 266关注 0票数 0

嗨,我是wx2的新手,无法获得适当的文档。我需要了解我们可以传递给wxloader实用程序的哪些参数?也就是说,-b-f在下面的命令中提到了什么?

代码语言:javascript
复制
wxloader -z Server_Ip -u User_name -p password -b /test/.test.err -f '|' --blank-null --trim-varchars -t "$TABLENAME"  /path_to_file 

还有为什么我们在-f之后使用-f

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-08-26 12:33:06

根据Kognitio文档(命令行工具)

代码语言:javascript
复制
Usage: wxloader -s <dsn> -u <user> -t <table> <filename>

转换选项:

代码语言:javascript
复制
-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,则忽略字段转换选项。

记录级转换选项:

代码语言:javascript
复制
   --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

文件级转换选项:

代码语言:javascript
复制
-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

报告选项:

代码语言:javascript
复制
-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

行为选择:

代码语言:javascript
复制
-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)

在你的情况下

代码语言:javascript
复制
wxloader -z Server_Ip -u User_name -p password -b /test/.test.err -f '|' --blank-null --trim-varchars -t "$TABLENAME"  /path_to_file 

尝试连接到服务器abd,将表导出到管道分隔的文件中。

-f用于字段分隔符,而|只是实际的字段分隔字符串。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25013258

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档