Spotfire® 用户指南

Spotfire® Data Streams 连接器 - 功能和设置

可以使用 Spotfire® Data Streams 连接器连接和访问流数据。在此页面上,可以了解相关功能、可用设置以及处理与 Spotfire Data Streams 的数据连接时的注意事项。

页面内容

连接器功能

使用 Spotfire Data Streams 连接器访问数据时,可以使用以下功能。

功能 支持?
加载方法
  • 导入(内存中)
  • 外部(数据库内)
  • 按需
自定义查询
预存程序
自定义连接属性
使用身份提供程序进行单点登录
在 Web 客户端中编写
包含在 Linux 上的 Spotfire 发行版中

数据源属性

以下是在使用 Spotfire Data Streams 连接器创建数据连接时可以配置的受支持的数据源属性。

选项 说明
服务器或流 URL 要连接到的 Spotfire Data Streams 服务器或特定数据流。可以是服务器、服务器地址或 TIBCO Cloud 上数据流的 URL。
当您输入服务器 URL 时,可以指定端口号。直接在服务器名称后面添加冒号和端口号即可。例如:
https://my-database-server.com:10081
如果不指定端口号,将使用默认端口号 10080。当您输入数据流的 URL 时,必须提供 TIBCO Cloud 上特定数据流的 URL。例如:
 https://my-streaming-data-url.com:443/api/v1/streams/<GUID>/runtime/connect
身份验证模式 登录到 Spotfire Data Streams 服务器或 TIBCO Cloud Data Streams 时要使用的身份验证方法。
无身份验证
连接到数据源而不提供任何凭据。
用户名和密码
在数据源中输入数据库用户的凭据以进行身份验证。
当打开的分析使用身份验证模式设置为用户名和密码的连接时,系统会提示您使用凭据登录到数据源。
注: 使用“用户名和密码”身份验证,可以将凭据以未加密的形式存储在分析文件中。如果在分析文件中找到凭据,则会使用这些凭据对数据库进行自动身份验证。如果使用嵌入的凭据进行身份验证失败,系统不会提示您输入其他凭据。
Windows 身份验证
以当前登录到计算机的 Windows 用户身份连接到数据源,以进行自动身份验证。将使用已登录的 Windows 用户的访问令牌进行身份验证。
注: 如果为 Spotfire Data Streams 服务器配置了 Kerberos 身份验证,则可以使用这种身份验证模式。
TIBCO Cloud™ 身份验证
[您只能在连接到 TIBCO Cloud Data Streams 时使用此身份验证模式。]
当您在 TIBCO Cloud 上使用 Spotfire 时:
当您连接到与您当前登录的 TIBCO Cloud 订阅位于同一个区域的流时,会自动登录到 TIBCO Cloud Data Streams。
如果您要连接到的流位于同一个组织但不同区域,Spotfire 会在您的 Web 浏览器的新选项卡中启动 TIBCO Cloud 登录程序。然后您可以授权 Spotfire 访问您的 TIBCO Cloud Data Streams 数据。
当您使用 Spotfire 的内部部署安装时:]
在 Web 浏览器的新选项卡中启动 TIBCO Cloud 登录程序。然后您可以授权 Spotfire 访问您的 TIBCO Cloud Data Streams 数据。
要求您所拥有的 TIBCO Cloud Data Streams 订阅与要访问的特定数据流在同一个组织中。

使用 TLS/SSL 选中此复选框可在连接到 Spotfire Data Streams 服务器时使用 TLS/SSL 加密。
使用压缩 选中此复选框可在连接中使用数据压缩。

您所选择的“使用压缩”选项可能会影响连接性能。这可能取决于,例如,Spotfire Data Streams 服务器是位于您的本地网络还是位于很远的地方。

注: 默认情况下,“使用压缩”复选框为已选中状态。

受支持的数据类型

设置到外部数据源的连接时,Spotfire 需要将数据源中的数据类型映射到 Spotfire 中的数据类型。以下是 Spotfire Data Streams 连接器支持的数据类型。

数据库数据类型 Spotfire 数据类型
blob Binary
bool Boolean
timestamp DateTime 或 TimeSpan

Spotfire Data Streams 中的 timestamp 数据类型既可以表示绝对时间戳,也可以表示时间间隔。包含 timestamp 数据的列应相应地映射到 Spotfire 数据类型 DateTime 或 TimeSpan。

绝对时间戳数据 = DateTime

时间间隔数据 = TimeSpan

默认情况下,timestamp 列映射到 Spotfire 中的 DateTime 数据类型。创建连接时,必须手动将包含时间间隔类型数据的 timestamp 列的类型映射更改为 TimeSpan。如果此类列映射到 DateTime,则列中的数据无法正确加载。
注: 无法加载同时包含绝对时间戳数据和时间间隔数据的 timestamp 列。
int Integer
long LongInteger
double Real
string String

支持的函数

支持的函数是指您在处理数据库中的数据表时可以使用的函数,例如在计算的列和自定义表达式中使用。

注: 您的数据库可能无法使用某些受支持的函数。这取决于数据库中可用的函数,不同数据库版本和类型之间通常会有差异。

以下是 Spotfire Data Streams 连接器支持的函数。

函数类型 支持的函数
日期和时间 DayOfMonthDayOfWeekHourMinuteMonthSecondYeardatedaysepochformat_timefrom_gmtimefrom_localtimefrom_unixtimeget_day_of_monthget_day_of_weekget_day_of_yearget_hourget_millisecondget_minuteget_monthget_secondget_yearhoursmillisecondsminutesnowparse_timesecondsset_day_of_monthset_day_of_weekset_hourset_minuteset_monthset_secondset_yearstrftimestrpintervalstrptimetimethis_monthtimezoneoffsetto_millisecondsto_secondstodaytoday_utcweeksyesterday
转换 BooleanDateTimeIntegerLongIntegerRealStringTimeSpan
数学 absacosasinatan、atan2、bitandbitnotbitorbitxorblack_scholescbrtceilchoosecompound_interestcoscoshexp、expm1、factorialfloorgaussianrandomisnanln、log10、log1p、lshiftnotnanpermutepowrandomroundrshiftsignsinsinhsqrttantanhto_degreesto_radiusunsignedshift
运算符 +、-、*、/、%
统计 avgavgifcorrelation_coefficientcorrelation_coefficientpcountcount_distinctcountifcountlongcovariancecovariancepfirstnonnullvalfirstvalinterceptlastnonnullvallastvalmaxminpercentileproductslopestdevstdevpsumsumifvariancevariancepvwapwithmaxwithmin
文本 containsendswithindexofisemptylastindexoflowerltrimrandomstringregexmatchregexmatch_ignorecaseregexplacereplacertrimstartswithstrlenstrresizetruncsubstrupper
效用 coalescegreat_circle_distancehashisnulljsonpathlength、md5、notnulluuid