Spotfire:如何在数据函数中写入 SQL?
Spotfire: How to write SQL in Data Functions?
我一直在尝试在 Spotfire 的数据函数 Window 中的 TERR 中写一个 SQL。
我在 Spotfire 中有 2 个表(Teradata 和 Xls)。我必须将两者加入公共列(左),然后执行聚合。
我通过 Insert>>Columns 选项将我需要的列从 xls 拉到 teraData Table 中。
现在我想要 运行 的 sql 是:
“SELECT 产品,sub_prod,年,月,周,计数(id)/平均(率)cnt
来自 ip1
按产品分组,sub_prod,年,月,周
当我刚说
op1 <- sqldf(SELECT prod,sub_prod,year,month,week,count(id)/avg(rate) cnt
来自 ip1
按产品分组,sub_prod,年,月,周”)
它抛出一个错误。
"TIBCO Spotfire Statistics Services returned an error: 'Error in library(sqldf) : there is no package called 'sqldf''"
我做错了什么?
此致,
苏布罗
假设您为部署安装了统计服务...https://docs.tibco.com/products/tibco-spotfire-statistics-services-7-5-0
- 安装 sqldf 包:http://admin.viewcentral.com/events/uploads/TIBCO/Install-R-Packages_v65.pdf
- 重启专业客户端
- 在注册数据中导入包运行操作window
- 运行 你的脚本
这应该可以解决您的错误。
我一直在尝试在 Spotfire 的数据函数 Window 中的 TERR 中写一个 SQL。 我在 Spotfire 中有 2 个表(Teradata 和 Xls)。我必须将两者加入公共列(左),然后执行聚合。 我通过 Insert>>Columns 选项将我需要的列从 xls 拉到 teraData Table 中。 现在我想要 运行 的 sql 是: “SELECT 产品,sub_prod,年,月,周,计数(id)/平均(率)cnt 来自 ip1 按产品分组,sub_prod,年,月,周
当我刚说 op1 <- sqldf(SELECT prod,sub_prod,year,month,week,count(id)/avg(rate) cnt 来自 ip1 按产品分组,sub_prod,年,月,周”) 它抛出一个错误。 "TIBCO Spotfire Statistics Services returned an error: 'Error in library(sqldf) : there is no package called 'sqldf''"
我做错了什么?
此致, 苏布罗
假设您为部署安装了统计服务...https://docs.tibco.com/products/tibco-spotfire-statistics-services-7-5-0
- 安装 sqldf 包:http://admin.viewcentral.com/events/uploads/TIBCO/Install-R-Packages_v65.pdf
- 重启专业客户端
- 在注册数据中导入包运行操作window
- 运行 你的脚本
这应该可以解决您的错误。