Use Oracle Autonomous Database to Store Historical IoT Data

Oracle Autonomous Database runs on Oracle Cloud Infrastructure and provides workload-optimized cloud services for transaction processing and data warehousing. If you have a subscription for Oracle Autonomous Database, you can use it to store your IoT sensor and analytics data for long-term persistence.

You can choose either an Oracle Autonomous Transaction Processing database , or an Oracle Autonomous Data Warehouse database to externally store your IoT data.

Use the following steps to add and configure your external Oracle Autonomous Database storage:

  1. Add an Oracle Autonomous Database Integration
  2. Enable and Configure the Oracle Autonomous Database Integration

Add an Oracle Autonomous Database Integration

To start storing IoT historical data in an Oracle Autonomous Database, add and configure a new integration for External Data Storage (Oracle Autonomous Database).

  1. In your IoT application, click Menu (Menu icon), and then click Settings.
  2. Click Integrations.
  3. Click Add Add icon to add a new integration.
  4. In the Add Integration dialog, select External Data Storage (Oracle Autonomous Database) and click Add.
    Tip: You can also search for an integration name in the list.

    Add Integration Dialog (described in Steps)

    Note:

    You can only have one external data storage integration at a time. So, you cannot add both Oracle Autonomous Database and Oracle Object Storage integrations at the same time. If you need to switch from Oracle Object Storage integration to Oracle Autonomous Database, you should first remove the Oracle Object Storage integration from the Integrations page.
    The External Data Storage (Oracle Autonomous Database) integration gets added to the Integrations page.
  5. On the Integrations page, under External Data Storage (Oracle Autonomous Database), click Connect to specify the connection details.
    1. In the External Data Storage Connection dialog, click Upload Wallet Zip File to upload the wallet required to securely connect to your database.
      Oracle client credentials (wallet files) are downloaded from Oracle Autonomous Database by a service administrator. If you are not the database administrator, your administrator should provide you with the client credentials. The wallet file for the ATP/ADW database can be downloaded from the ATP/ADW service console.
      After you upload the wallet file, the application verifies the wallet and prompts you for the database login credentials.
    2. Enter the User Name and Password used to log into the database.
    3. Select the Service Name for the database.
      The list of service name options is retrieved from the wallet that you uploaded earlier.
    4. Click Verify Connectivity to verify connectivity to your Oracle Autonomous Database instance.

      External Data Storage Connection Dialog (Described in Steps).

      The Save button is enabled after successful verification of the connection credentials.
  6. Click Save to save your Oracle Autonomous Database connection settings.

Enable and Configure the Oracle Autonomous Database Integration

To start storing IoT historical data in your Oracle Autonomous Database, enable and configure the integration for External Data Storage (Oracle Autonomous Database).

  1. In your IoT application, click Menu (Menu icon), and then click Settings.
  2. Click Integrations.
  3. Under External Data Storage (Oracle Autonomous Database), click Edit Configuration.
    1. Optionally enter a Table Prefix.
      Your IoT application prefixes the specified Table Prefix to the table names that it creates in Oracle Autonomous Database. This helps with easy identification of tables.
    2. Optionally change the Export Interval if you want your application to write more frequently to Oracle Autonomous Database.
      The default data export interval is 4 Hours.
    3. Select the IoT data that you wish to store externally:
      • Attributes: You can choose to export all raw sensor attribute data. Alternatively, you can choose to export only aggregated attribute data, which exports aggregates, such as Average, Maximum, and Minimum values of your attribute values. Under Attributes Granularity Level, select Aggregated to export only aggregated attribute data. Under Attributes Granularity Level Interval , specify the aggregation interval. This determines the frequency at which the aggregated values are calculated.

        If you select None (raw data), then all raw sensor data is exported.

      • Metrics: Select to export metric data corresponding to system metrics and computed metrics.

      • Anomalies: Select to export anomaly data.

      • Predictions: Select to export prediction data.

      • Trends: Select to export data related to trends.

      • Incidents: Select to export your rule incidents.
      • Warnings:Select to export your rule warnings.
    4. Toggle the Integration Status switch to Enabled.
  4. Click Save to save your configuration settings.