Example
Step | Visual | Detail |
---|---|---|
Configure Custom Fields for Context Item Types | ![]() | Configure in ConfigHub on an admin account |
Create and Context Item Types (include custom fields) | ![]() | Configure in ConfigHub on an admin account |
Create SQL Table | ![]() | Configure in ConfigHub on an admin account Create SQL Table Tables must include id, componentType, type, description, startEvent, startTime, endEvent, and endTime. After that, custom fields can be added as additional columns. Note that in your case, “componentid”, “componenttype”, and “type” column will all likely be the same values for batch sheets. Componentid is the tag the context item will be associated with, componenttype will likely be TAG, and the type will be the name of the Context Item type you created (ex. Batch Sheet) |
Define the data source | ![]() Use the TrendMiner API console to obtain data-sourced for sync in later steps: ![]() | |
Define the Query | ![]() ![]() ![]() | The rows from id to endTime are required, and additional custom fields can be added after. startDate and endDate will be defined in the syncs. Test the query within your environment to verify functionality prior to posting via API. |
Historical Sync | ![]() | datasourceId and queryId are found using the GET method strings shown in previous steps. Locate the number of the desired database and query. Prefix is not required, but can be used to collect context items with the same name from different data sources (ex. using batch id to label different context item types). NoteWe recommend inputting a chunksize of 1440 |
Define Sync Job | ![]() ![]() | This sync job will sync with the SQL database every 10 minutes. |
Live Sync Job | ![]() | This will schedule ongoing syncs of the defined database at the defined syncJobInterval. This example assumes that sync job id is 14. |