使用 JDBC URL 连接到 Oracle Analytics Cloud(使用资源所有者断言)

结合使用 JDBC 连接和资源所有者断言连接到 Oracle Analytics Cloud,以便您可以查询语义模型。

  1. 创建 bijdbc.properties 文件,其中包含连接到 Oracle Analytics Cloud 实例所需的 OAuth 验证和授权属性。
    使用您之前收集的详细信息。请参见收集 bijdbc.properties 文件所需的详细信息。对 bijdbc.properties 文件使用以下格式:
    idcsEndpointUrl=https://<IDCS_hostname> 
    idcsClientId=<ID string>
    idcsClientScope=<ID string> 
    idcsClientSecret=<secret>
    user=<firstname.lastname@example.com>
    password=<password>

    例如:

    idcsEndpointUrl=https://idcs-1a2bc345678901d2e34fgh56789j0ke.identity.c9abc1.oc9def.com
    idcsClientId=12a000dc9ef345678000ghij2kl8a34   
    idcsClientScope=https://<host>.com:443urn:opc:resource:consumer::all
    idcsClientSecret=xyz
    user=myuser@office.com
    password=yourpassword
  2. 确定连接到 Oracle Analytics Cloud 实例所需的 URL。所使用的格式取决于部署实例的时间和方式。
    要连接到在以下平台上部署的实例 创建日期

    Oracle Cloud Infrastructure(第 2 代)

    任意

    Oracle Cloud Infrastructure

    2020 年 5 月 12 日或之后

    OAuth 使用以下 URL 格式:

    jdbc:oraclebi:https://<host>:<port>/api/jdbc?BIJDBC_PROPERTIES_FILE=<fully qualified location and name of properties file>

    例如:

    jdbc:oraclebi:https://<host>:443/api/jdbc?BIJDBC_PROPERTIES_FILE=D:\\Workspace\\bijdbc\\bijdbc.properties
    要连接到在以下平台上部署的实例 创建日期

    Oracle Cloud Infrastructure

    在 2020 年 5 月 12 日之前

    OAuth 使用以下 URL 格式:

    jdbc:oraclebi:https://<host>:<port>/bimodeler/api/jdbc?BIJDBC_PROPERTIES_FILE=<fully qualified location and name of properties file>

    例如:

    jdbc:oraclebi:https://abcdefghi123-jklmnopqrs4t-je.analytics.ocp.oraclecloud.com:443/bimodeler/api/jdbc?BIJDBC_PROPERTIES_FILE=D:\\Workspace\\bijdbc\\bijdbc.properties
  3. 测试与目标 Oracle Analytics Cloud 实例的连接。
    通过您喜好的 SQL 命令工具,使用相应 JBDC URL 连接到 Oracle Analytics Cloud。例如:
    jdbc:oraclebi:https://abcdefghi123-jklmnopqrs4t-je.analytics.ocp.oraclecloud.com:443/api/jdbc?BIJDBC_PROPERTIES_FILE=D:\\Workspace\\bijdbc\\bijdbc.properties