“cognos10开发文档.doc”
在Cognos 10的开发过程中,构建数据分析模型是至关重要的步骤。本文档主要介绍了如何使用Framework Manager创建IQD文件(数据源)以及如何通过Transformer来创建MDL文件,用于构建多维数据集(CUBE)。
首先,创建IQD文件是CUBE开发的第一步。IQD文件是用来定义数据源的,它包含了从数据库中提取数据所需的信息。在Cognos 8.2之前,IQD文件在UNIX环境下无法自动刷新,但在Cognos 8.3及更高版本中,可以使用Framework Manager来替代这一过程。具体操作包括:
1. 打开Framework Manager,设置项目名称和存储位置。
2. 选择语言为“中文”,并定义DataSource,即选择你要连接的数据源。
3. 从数据源中挑选你需要的表,通常是围绕一个主题的大致集合。
接下来,创建MDL文件是构建CUBE的核心环节。MDL文件定义了多维数据模型的结构,包括度量(指标)、维度和事实表。在Transformer中:
1. 启动Transformer应用程序。
2. 新建MDL文件,通常跳过向导直接进行手动配置。
3. 数据源区域将展示IQD文件或Framework Manager创建的数据源。
4. 指标区域用来定义计算和度量。
5. CUBE生成区域是最终数据模型的呈现。
6. 维度区域则定义了分析的各个侧面。
7. 插入数据源、显示图表、数据源查看器、模型检查、类别生成等工具辅助构建和验证模型。
8. PowerPlay for Windows(在Cognos 8.2中)或Create PowerCube按钮用于查看和生成CUBE。
MDL文件的字符集必须符合Cognos的要求,通常是UTF-8。可以通过以下步骤修改:
1. 打开File菜单,选择Model Properties。
2. 在Cube Codepage选项中,将字符集设置为UTF-8。
最后,一个MDL文件可以导入一个事实表和多个维表,这允许在多维模型中建立复杂的关联和聚合。
Cognos 10的开发涉及了数据源的定义、多维模型的设计和CUBE的生成,这些步骤都是为了创建一个能够支持高效分析和报告的数据环境。正确理解和应用这些技术对于开发高质量的Cognos应用至关重要。