调试经验——Spotfire Information Link(直连数据库)的创建方法(Creating an Information Link)

正如古人所言,“纸上得来终觉浅,绝知此事要躬行”。今天又被Spotfire的Information Link耗掉了一整天时间。如果自己的经验更丰富一点,或许就是事半功倍了。

用户需求发生了变化,原来query中的一些条件已经过时,导致查询出来的数据量偏小,进而导致一个关键指标(“单位报告提出问题数”, IssuesPerReport)明显偏高。

客户需要将临床试验方案级别(Protocol Level)的指标与试验药物级别(Asset Level)及公司级别(Enterprise Level)进行纵向比较。

应该是某位级别颇高的领导比较重视这个视图(view)(目前的Spotfire报表中已包含几十张view,引用不同数据集,各有侧重点),所以,客户盯得比较紧,希望尽快解决这个问题。


解决过程如下:

第一天:分析问题

1. 向客户索要测试数据(即,期待的统计结果)

2. 分析当前数据及和客户数据有何差异以及出现差异的原因(Reports数量不同;当前报表中只列出了有Issue的Report,没有Issue的Report不会出现在数据集中)

3. 发信给客户,确认是否需要移除所有filter(这样,更多的report都会被统计进来)

为此,专门写了一篇文章记录分析问题的过程:http://blog.csdn.net/hpdlzu80100/article/details/79587815, 调试经验——Spotfire复杂报表的维护方法(基于数据分析、Oracle多表查询)                   


第二天:数据分析

1. 没有得到客户的反馈,所以在Toad中自己分析了一下各个filter对数据集的影响

2. 基本上形成了一个解决问题的思路(如,先写好Query并在Toad中调试,新建一个Information Link而不是直接修改现有的Information Link)


第三天:实施、测试、交付

1. 客户等不急了,约上其他business user,一起开了一个多小时的会。会上明确了filter的需求(这个非常重要,直接决定了至少需要哪些表,哪些连接条件,哪些joins/filters)。

2. 在会上,我向客户展示了一个我设计的更好用的图表形式(多指标纵向柱状图)。相比客户的原格式,有以下好处:

1)将本来由三个视图组成的图表组简化成了一张图表,具有统一的坐标轴,方便各指标(即,Protocol/Asset/Enterprise Level的IssuesPerReports)进行比较

2)相比之前的横向柱状图,纵向柱状图中各指标的大小关系一目了然

3. 最耗时间的就是Information Link的创建了,经验教训如下

1)从少到多,由易到难,每有重要更新(如,新加了一个他表中的字段,新加了一个join),及时保存information link,如有错误,及时修改。切忌贪多求全,一步登天。

2)Information Link由column, filter, joins等元素组成,相同元素必须来自同一个data source(table)。有时,两个字段看上去一模一样(column name相同),但来自不同的table, 误将他们看作同一字段的结果就是会出现“Tables not joined...”错误

3)两个data source看上去一模一样,实际上不一样,前面用哪个,后面必须用哪个(我被困在这个坑里有两个多小时)



当然,经验归经验,基础必须要扎实,才能躲开一个又一个的“坑”。

顺便“搬运”一下Spotfire官方的Information Link的创建方法。


----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Creating an Information Link 


Information Designer allows you to create information links. The building blocks are column-, filter- and procedure elements that have been set up by you or the database administrator.

  • To create an information link:

  1. Click New and select Information Link.

    Response: An Information Link tab is opened.

  2. In the Elements tree, select the column or filter element that you want to include. You can also include procedures.

    Comment: If the Elements tree is not visible in the left-hand pane, click on the Elements tab to display it. Click the + symbol to expand a folder. You can select multiple elements simultaneously by pressing Ctrl and clicking on the elements of interest, or by pressing Shift and clicking on the first and last element in a list.

  3. Click Add > .

    Response: The selected element is added to the Elements list on the Information Link tab.

    Comment: To remove an item from the information link, select the item and click < Remove.

  4. If the selected elements come from more than one data source table, you need to specify a Join path. This means that you must create all joins needed to link all data tables together and you must also specify these in the Join path section on the Information Link tab.

  5. In the Description field, type some text describing the purpose of the information link. This is optional.

  6. If you want to filter the data, open the Filters section and follow the instructions under Adding Hard Filters.

  7. If you want to add prompts (run-time filtering), open the Prompts section and follow the instructions under Adding Prompts.

  8. Optionally, you can also choose to specify any Conditioning, Parameters or Properties that are needed for your information link. You can also specify whether or not the information link should be cacheable. See Information Link Tab for more information and links.

  9. Click Save.

    Response: The Save As dialog appears.

  10. In the folder tree, select where you want the information link to be saved.

  11. In the Name field, type a name for the information link.

  12. Click Save.

    Response: The new information link is added to the library. It can now be accessed by other users.

Tip: You can test the information link directly by clicking on Open Data.

Tip: You can view and edit the SQL behind the information link by clicking SQL....


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
Spotfire可以连接多种类型的数据库,包括关系型数据库(如Oracle、SQL Server、MySQL)和非关系型数据库(如MongoDB、Hadoop)。要连接数据库,您可以按照以下步骤操作: 1. 打开Spotfire Desktop或Web客户端。 2. 在主菜单中,选择“File(文件)”>“Connect to Data(连接到数据)”。 3. 在“Data Source(数据源)”对话框中,选择“Database(数据库)”选项卡。 4. 选择您要连接的数据库类型。如果数据库类型不在列表中,您可以选择“Other(其他)”并提供必要的驱动程序和连接详细信息。 5. 输入数据库服务器的名称或IP地址,并提供登录凭据(用户名和密码)。 6. 根据数据库类型和配置,您可能需要提供其他连接详细信息,如数据库名称、端口号等。 7. 单击“Test Connection(测试连接)”以确保Spotfire能够成功连接到数据库。 8. 如果连接测试成功,单击“OK(确定)”保存连接配置。 9. 您将返回到“Data Source(数据源)”对话框,可以选择要从数据库中加载的表或视图。 10. 选择要导入的数据表,并单击“Add(添加)”将其添加到Spotfire项目中。 11. 单击“OK(确定)”以完成数据库连接和数据导入过程。 通过这些步骤,您可以成功地将Spotfire连接到数据库并在分析中使用数据库中的数据。请注意,具体的步骤可能会因Spotfire版本和数据库类型而有所不同。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值