IBM/BlueMix iOT dashboard line graph not using database (only works in realtime)? - ibm-cloud

(See picture)
I have successfully connected my iOT device to the BlueMix IoT platform
I can see all the events nicely flowing into the dashboard
I now enabled the extension in BlueMix IoT to store all data in "Historical Data Storage" (refer to https://developer.ibm.com/recipes/tutorials/cloudant-nosql-db-as-historian-data-storage-for-ibm-watson-iot-parti/#r_step3)
I can see the data correctly being written in the database
When I put a line graph on the dashboard in BlueMix IoT it does show a graph but only for the realtime data, it seams its not using the historical data now stored in the database. (refer to https://developer.ibm.com/recipes/tutorials/cloudant-nosql-db-as-historian-data-storage-for-ibm-watson-iot-partiii/)

After being in contact with IBM using Skype with screen sharing we found the solution.
Turns out that I did not enter an event in the cards config; I only entered a property and for some reason this is ok for realtime data but not for fetching the historical data out of the DB!
As soon as I entered my event (In my case it was 'status' but this should match your MQTT event name specifically) al worked ok!

Can you confirm per the details in the recipe - https://developer.ibm.com/recipes/tutorials/cloudant-nosql-db-as-historian-data-storage-for-ibm-watson-iot-partiii/, that your Window Size was configured while creating line chart card to display the data for the time period it was gathered in the database?
For example, Data from Last 24 Hours, in this case, window size is 24 Hours and we should see the data from historian only for last 24 Hours not beyond that whether data is in real time / data is stored in historian.
Be sure the window size configured for your chart encompasses the historical time for when you expected to see data.

Related

Firebase Flutter Offline Capability - to get accurate timestamp for offline records

Can Firebase get accurate time for offline records which have been stored in device when the device's clock has been changed? The device's clock might be changed when the user rebooted the device or when the user adjusts the date time manually.
My case is quite similar to Get actual DateTime of a device in Offline Mode which I can quote here 1) The application can work in online as well as offline. The app has a feature to create and save the NOTES inside the application. Also, When the app gets internet connection, I need to send the NOTES to backend server. I have a field called 'DATECREATED' in each NOTE (the datetime where the actual NOTE was created) ISSUE: If the User has set the DateTime wrongly in the device, My application sends the incorrect DATETIME to server.
I am going to handle the offline issue on Android and IOS platform, so I came out with another possible solution such as get the GPS time, using some sort of background counter, etc. Based on my experiment, the solution are not reliable enough and some might difficult to do. That's why I decided to get the accurate timestamp using Firebase.
I read a reference https://firebase.google.com/docs/database/flutter/offline-capabilities#clock_skew, but I am not quite sure whether it can help me to get accurate time for offline records.
There is no way you can get a server timestamp while offline. Why? Simply because the timestamp is totally generated on the server. And since you're offline and cannot communicate with the server, you cannot get an estimation. So there is no other system that can generate a timestamp other than the Firebase server.
Besides that, a date that can be generated on the client can be manipulated, so you cannot rely on that.
The option that you have in my opinion would be to have two fields. One is for the real timestamp, which you'll be received when you're back online and the other one is what the client provides. In that way, you make a comparison, if this is what you want.
Edit:
Firestore, is a Cloud hosted NoSQL database. So there is no way you can generate an accurate time while the user is offline. What you can certainly do is calculate the period of time while the user is offline. This means that you have to calculate the number of minutes the user has lost connectivity. Let's say a user losses connectivity for 10 minutes, when it regains connectivity, you receive the Firestore timestamp. Now, all you have to do is to subtract those 10 minutes from the received timestamp in order to have the accurate time that you're looking for.

Can we combine Tableau Extract and live data?

I have a billing data set that ranges from 2017 to 2019 (until current). Data doesn't change for 2017,2018 and till November, 2019. It changes either for the current month or for the complete ongoing month..
I want to create one .hyper extract and store the static data in local server for the data that doesn't change and if needed also publish it for other users to use.
How to append the new data to extract? Can we union it with a live connection or append the data to the extract?
Depending on datasource compatibility, you can do this with Tableau Prep or the new Hyper API. Links as of 12/2019 are below.
Tableau Prep
Hyper API (Python)
If you have a twbx (tableau packaged workbook) file on your local system open that and change the data source connection to live and click update.
Then publish this dashboard with the "same name" which has the latest data, tableau server will ask you if you want to replace the existing dashboard -> click yes
Not sure if you're using a database. If yes, you can create views and then connect them
1.live to tableau dashboard which will get you the latest data all the time
2.Extract mode to refresh based on a set frequency
Hope this helps!

Tableau doesn't shows latest data

newbie to tableau since 2 weeks
i created dashboard in tableau and it shows schedule
i published dashboard but it does not shows latest data in database
so how to show latest data on browser refresh as soon as database is updated ?
Note: not talking about live data streaming
When you use Extract and don't set refresh schedule then you won't be able to see the latest data.
You should keep a Refresh Schedule if you are using an Extract. For example, you can keep a Daily Night Schedule for refresh.
You can check the Last extract status or refresh schedule in server under the specific workbook.
If you have created a data extract then the data will appear on the page after extract has run successfully. Check the schedule status to see if the schedule was successfully completed. You can manually run the task after creating a schedule for it also.
After 5 days found solution buried in tableau documentation
By Tableau Bridge you can maintain fresh data all the time
Tableau Bridge Example Video
To promote their product, Tableau have hidden fresh data documentation deep down, that no one could find

Import graphics between differents Watson IoT dashboards

I have a board on my Watson IoT dashboard, which I use to monitor temperature real-time with a line graphic.
I have a second dashboard with a different organisation, and I want to import the graphic which is in the board in the first dashboard, without making again the same graphic.
I've already tried that solution and, even if possibile, it wouldn't be efficent. I mean, I already have the data on IoT why sending from IoT to Iot?
So, can i display on, let's call it... dashboard2, the board with the temperature (or any other property) which is in dashboard1 without sending or duplicate data on dashboard2?
If so, how can i do that? It's almost a week that I'm searching, and I start to doubt that something like this actually exists...

Published Workbook or Dashboards takes quite long time to open in Tableau server

I am using Tableau Desktop 8.2 and Tableau server 8.2 (Licensed versions) , the workbook created in Tableau are successfully published to Tableau server.
But when the user want to see the views or workbooks it takes a very long time to preview or open?
The Workbooks are created with Amazon RedShift Database having (>5 million records)
Could somebody guide me on this? like what is it taking a long to preview or open even after being published to Tableau server?
First question, are the views performant when opened using only Tableau Desktop? Get them working well on Desktop before introducing Server into the mix.
then look at the logs in My Tableau Repository which include query strings and timing info to see if you can narrow down the cause. You can also try the Performance Recorder feature.
A typical problem is an overly expensive query just to display a dashboard. In that case, simplify. Start with a simple high level summary viz and the introduce complexity testing the impact on performance. If one viz is too slow, there are usually alternative approaches available
Completely agree with Alex; I had a similar issue with HP Vertica. I had lot of action set on the dashboard. Considering the database structure is final, I did created the tableau extract and used the Online tableau extract in place of live connection. Vola! that solved my problem and the users are happy with the response time as well. Hope this helps you too..
Tableau provides two mode of data refreshes:
Live : Tableau will execute underlying queries every time the
dashboard is referred / refreshed. Apart from badly formulated
queries, this is one of the reason why your dashboard on Tableau Online
might take forever to load.
Extract : Query will be executed once, according to (your) specified
schedule and same data will reflect everytime the dashboard is
refreshed.
In extract mode, the time is taken only when the extract is being refreshed. However, if the extract is not refreshed periodically, the same, stale data will reflect on the dashboard. Thus, extract view is not recommended for representations of live data.
You can toggle Live <--> Extract from the Data Source pane of Tableau Desktop. (refer top right of the snapshot).