oracle 是否有将 SAS 转换为 SQL 的工具?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3296248/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 21:04:41  来源:igfitidea点击:

Are there any tools for converting SAS to SQL?

sqloracleplsqlsas

提问by orbfish

I am confronted with a 4-page SAS thing - macro? procedure? it has procedures within it, DATA blocks and PROC blocks, one PROC SQL block for importing from Oracle.

我遇到了一个 4 页 SAS 的东西 - 宏?程序?它包含过程、DATA 块和 PROC 块,一个用于从 Oracle 导入的 PROC SQL 块。

Is there a tool that could translate SAS to something readable? Ideal would be SQL or PL/SQL (both seem applicable here), but almost anything procedural would be an improvement. I don't need something runnable, just something human-readable.

有没有可以将 SAS 转换为可读内容的工具?理想的是 SQL 或 PL/SQL(两者似乎都适用于这里),但几乎任何程序性的都将是一种改进。我不需要一些可运行的东西,只需要一些人类可读的东西。

I know 2 dead languages already (TAL and TACL) - someone please save me from having to learn SAS.

我已经知道 2 种死语言(TAL 和 TACL)-有人请让我不必学习 SAS。

回答by emory

SAS->SQL converters exist. You can't buy them, but you can hire them.

存在 SAS->SQL 转换器。你不能买他们,但你可以雇佣他们。

回答by Gilbert Le Blanc

SAS is more than a data access tool. You would lose functionality if you converted SAS to SQL.

SAS 不仅仅是一种数据访问工具。如果将 SAS 转换为 SQL,您将失去功能。

If you're just looking for an explanation, post a link to the SAS code. Some of us know this "dead" language.

如果您只是在寻找解释,请发布指向 SAS 代码的链接。我们中的一些人知道这种“死”的语言。

回答by Robert Penridge

The short answer to your question is no. Short of learning the language there is no way to do this.

对你的问题的简短回答是否定的。没有学习语言就没有办法做到这一点。

回答by Blessed Geek

I am a SAS programmer.

我是一名SAS程序员。

I am also a SAS converter. I have converted SAS to Java, RDBMS (Sybase, SQL server or Oracle), JavaFreeCharts, AJAX.

我也是 SAS 转换器。我已将 SAS 转换为 Java、RDBMS(Sybase、SQL 服务器或 Oracle)、JavaFreeCharts、AJAX。

I am also a SAS reducer - for projects that still want to retain SAS statistical backend but AJAX frontend.

我也是一个 SAS 减速器 - 对于仍然想要保留 SAS 统计后端但 AJAX 前端的项目。

There isn't a complete way to convert SAS to SQL because

没有将 SAS 转换为 SQL 的完整方法,因为

  • SAS already has SAS/SQL and SQL in conjunction with SAS/Access SAS/Connect
  • Whatever that is not coded in SAS SQL may be convertible to stored procedures
  • Otherwise, they have to be converted to Java, a .NET language, or a web friendly language like python or Perl.
  • Charts have to be converted to a Java or .NET charting package.
  • You need familiarity with statistical analysis methods to convert SAS procedure calls to a language like Java, C++.
  • SAS 已经有 SAS/SQL 和 SQL 结合 SAS/Access SAS/Connect
  • 任何未在 SAS SQL 中编码的内容都可以转换为存储过程
  • 否则,它们必须转换为 Java、.NET 语言或 Python 或 Perl 等网络友好语言。
  • 图表必须转换为 Java 或 .NET 图表包。
  • 您需要熟悉统计分析方法才能将 SAS 过程调用转换为 Java、C++ 等语言。

So, yes - there is a way to convert SAS to Java EE or .NET and SQL or Perl. As Emory so succinctly puts it - you've got to hire someone to do it.

所以,是的 - 有一种方法可以将 SAS 转换为 Java EE 或 .NET 以及 SQL 或 Perl。正如埃默里 (Emory) 所言——你必须雇人来做这件事。

回答by jgunnink

If you just want to know what the code is doing generally, post it and I can tell you. If you want it converted perfectly to another language or set of languages, then you would need to hire someone like Blessed Geek to do it for you.

如果你只是想知道代码一般在做什么,把它贴出来,我可以告诉你。如果您希望将其完美地转换为另一种语言或一组语言,那么您需要聘请像 Blessed Geek 这样的人来为您做这件事。

It can be a non-trivial exercise, particularly if the procedure blocks are for statistical algorithms (such as multivariate regression) and not just for basic data manipulation or calculating metrics such as the mean or standard deviation.

这可能是一项重要的练习,特别是如果程序块用于统计算法(如多元回归),而不仅仅是用于基本数据操作或计算指标(如均值或标准差)。

At my last company, we had a large chunk of production SAS code (thousands of lines) that performed econometric modeling of grocery sales data. When SAS decided to deny us further licensing of the software citing a competitive product they were developing, we spent 9 months converting it to a combination of Java, a data flow product called Rapids, and some proprietary analytic libraries we purchased from a small company. It was a full time job for 8 developers during that time. 4 of them understood SAS really well, and the other 4 Java really well. Translating between the two worlds was a constant challenge.

在我上一家公司,我们有大量生产 SAS 代码(数千行),用于对杂货销售数据进行计量经济学建模。当 SAS 以他们正在开发的竞争产品为由决定拒绝我们进一步许可该软件时,我们花了 9 个月的时间将其转换为 Java、一种名为 Rapids 的数据流产品以及我们从一家小公司购买的一些专有分析库的组合。在此期间,这是 8 名开发人员的全职工作。其中 4 人非常了解 SAS,另外 4 人非常了解 Java。在两个世界之间进行转换是一项持续的挑战。

At any rate, I think you see my point.

无论如何,我想你明白我的意思。