Tableau 简明教程
Tableau - Editing Metadata
连接到数据源后,Tableau 会捕获源的元数据详细信息,如列及其数据类型。这用于在视图中创建维度、度量和计算字段。可以浏览元数据并更改其中一些属性以满足某些特定要求。
After connecting to the data source, Tableau captures the metadata details of the source like the columns and their data types. This is used to create the dimensions, measures, and calculated fields used in views. You can browse the metadata and change some of its properties for some specific requirements.
Checking the Metadata
连接到数据源后,Tableau 会显示源中存在的所有可能表和列。考虑源“Sample Coffee shop”以检查元数据。单击数据菜单,然后选择连接到数据源。浏览名为“Sample - Coffee shop”的 MS access 文件。将名为 Product 的表拖到数据画布。在选择文件时,你将获得以下屏幕,其中显示列名称及其数据类型。字符串数据类型显示为 Abc ,而数字数据类型显示为 #。
After connecting to a data source, Tableau presents all possible tables and columns present in the source. Consider the source ‘Sample Coffee shop’ for checking the metadata. Click the Data menu and choose to connect to a data source. Browse for the MS access file named ‘Sample - Coffee shop’. Drag the table named Product to the data canvas. On choosing the file, you get the following screen which shows the column names, their data types. The string data types are shown as Abc and Numeric data types are shown as #.
Changing the Data Type
如果需要,可以更改某些字段的数据类型。根据源数据,有时 Tableau 可能无法从源识别数据类型。在这种情况,我们可以手动编辑数据类型。以下屏幕截图显示了该选项。
You can change the datatype of some of the fields if required. Depending on the nature of source data, sometimes Tableau may fail to recognize the data type from the source. In such scenarios, we can manually edit the data type. The following screenshot shows the option.
Renaming and Hiding
可以通过重命名选项更改列名称。还可以隐藏列,使其不会出现在创建的数据视图中。这些选项可通过单击元数据网格中的数据类型图标获得,如下面的屏幕截图所示。
The column names can be changed by using the renaming option. You can also hide a column so that it does not appear in the data view that you create. These options are available by clicking on the data type icon in the metadata grid as shown in the following screenshot.
Column Alias
可以为数据源的每一列指定别名,这有助于更好地理解列的性质。可以选择上述步骤中的别名选项,将会出现以下屏幕,用于创建或编辑别名。
Each column of the data source can be assigned an alias which helps better understand the nature of the column. You can choose the aliases option from the above step and the following screen comes up which is used to create or edit aliases.