Teradata / Aster:使用查询快速导出/ ncluster_export [英] Teradata / Aster : Fast Export / ncluster_export using query
问题描述
我正在尝试从 Teradata Studio 14.10
/ Aster
中使用 ncluster_export
命令行功能。我找不到一个脱颖而出的实例。有人有人可以分享吗?另外我如何实际运行脚本(即 ncluster_export myScript1.bat
)?
I am trying to export a query from Teradata Studio 14.10
/ Aster
using the ncluster_export
command line function. I can't find a working example to go off of. Does anyone have one they could share? Also how would I actually run the script (ie ncluster_export myScript1.bat
)?
假设如下: p>
Assume the following :
File location: 'myhomedir'
Username: 'user1'
Password: 'pass1'
Outfile name: 'outFile1.csv'
推荐答案
要从Teradata Studio导出结果集,则可以从Teradata Result Set Viewer窗口中执行此操作。在右上角有一个导出图标。
If you want to export a result set from Teradata Studio then you can do that from the "Teradata Result Set Viewer" window. There's an export icon on the top right corner.
如果要运行SQL脚本,请将结果导出到一个文件,那么您应该使用ACT而不是 ncluster_export
If you want to run a SQL script then export the results to a file then you should use ACT rather than ncluster_export
语法是 -
act -h QueenIPaddress -U user1 -w pass1 -f myscript.sql -o $myhomedir/outFile.csv -F ','
这将传递一个SQL脚本到Aster并将输出重定向到指定的文件。 -F
参数指定分隔符。
This will pass a SQL script to Aster and redirect the output to the specified file. The -F
parameter specifies the delimiter.
还有其他可以使用的参数。 act --help将列出他们
There are other parameters you can use. act --help will list them
这篇关于Teradata / Aster:使用查询快速导出/ ncluster_export的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!