|
| 1 | +This document is to help you setup the IoTDBJDBC so upload to the time series DB, you will |
| 2 | +need to have already setup the time series DB and enable the users, look at the document |
| 3 | +TimeSeriesDatabase.txt for instructions on that. |
| 4 | + |
| 5 | +Note, look at the sample config.properties file for the details of the various properties supported. |
| 6 | + |
| 7 | +You will need to get the Time Series DB wallet onto the system youre running the JDBC/AQ code |
| 8 | +on. This is used to get some requried params for the Time Series DB option (those params can |
| 9 | +sometimes change, esp if the DB is stopped and then restarted) |
| 10 | +The command to do that is below (you need your .oci/config etc setup) and of course you need |
| 11 | +to have setup the database previously, and have the right policies in place to let you access |
| 12 | +and download the wallet file |
| 13 | +oci db autonomous-database generate-wallet \ |
| 14 | + --autonomous-database-id <autonomous_database_ocid> \ |
| 15 | + --password '<wallet_password>' \ |
| 16 | + --generate-type SINGLE \ |
| 17 | + --file wallet.zip |
| 18 | + |
| 19 | +unzip the file into a folder that the JDBC code can access, check the tns_names.ora file in |
| 20 | +there to get the connection name this is usually the DB name followed by _high (e.g. telemetry_high) |
| 21 | +though as this is only used once any of the connections would probabaly work fine |
| 22 | + |
| 23 | +Update the config properties for the timeseries DB to use these |
| 24 | +timeseriesdb.jdbc.connectionname=<connection name> |
| 25 | +timeseriesdb.jdbc.walletpath=<unzipped wallet directory path - e.g. ./configsecure/timeseriesdb> |
| 26 | +timeseriesdb.jdbc.username=<uname of ingest user> |
| 27 | +timeseriesdb.jdbc.password=<pw of ingest user> |
| 28 | + |
| 29 | +You will also need to setup some other filters in the normalized data message handler chain to be |
| 30 | +called BEFORE (i.e. with a lower order) the timeseriesdb output module as the Oracle Time Series DB |
| 31 | +functionality can't currently handle non numeric data. I recommend enabling the |
| 32 | +NormalizedDataContentJsonTypeMessageFilter and setting it to only pass on data that is of type DECIMAL, |
| 33 | +DOUBLE, FLOAT. If you want boolean data that is mapped to 1 / 0 so to include that you need to |
| 34 | +also have TRUE and FALSE in the json type filters list (note that both are required as JSON seems to |
| 35 | +treat them as distinct data types) |
| 36 | + |
| 37 | +If you wish you can also limit the data uploaded by adding additional filters in advance of the TS DB |
| 38 | +output module, the NormalizedDataDeviceModelsMessageFilter can be used to limit to specified device |
| 39 | +model names (it allows all content for that model), and the NormalizedDataContentPathsMessageFilter |
| 40 | +filter can be used to limit to specific content paths (allowing all entries with that contentPath |
| 41 | +across multiple models). You can combine the two along wiht other filters of course. |
0 commit comments