简体   繁体   English

如何以编程方式在RedShift SQL脚本文件上运行

[英]How to run on RedShift sql script file programmatically

Is there any way to run SQL script file (located, for example, on S3) on Amazon Redshift using Java or C#? 是否可以使用Java或C#在Amazon Redshift上运行SQL脚本文件(例如,位于S3上)? I can execute stand-alone commands using AWS SDK and Npgsql for .NET, but I can't find the method for running the stand-alone file. 我可以使用适用于.NET的AWS开发工具包和Npgsql执行独立命令,但是找不到用于运行独立文件的方法。

No, it is not possible to tell RedShift to execute an SQL command stored elsewhere. 不,不可能告诉RedShift执行存储在其他位置的SQL命令。

You would need to retrieve the script and then pass it to RedShift via JDBC/ODBC, in the same way that you are running stand-alone commands. 您将需要检索脚本,然后以与运行独立命令相同的方式通过JDBC / ODBC将其传递给RedShift。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM