The data is entered in another part of this worksheet during the last night and with the data entered the worksheet begins to perform calculations and processing. However, every time we access the worksheet, it is as if the processing is "redone" and we have to wait minutes, sometimes hours, for the worksheet to process all the data again.
I would like to know if there is any way that these processings were not "redone" where the entered data would only be processed again with the insertion of new data in the other part of the worksheet.
Problem images:
First access to the worksheet: after opening the worksheet, data starts to be processed at 10:48
10 minutes after opening the spreadsheet and processing is still active...
Approximately 15 minutes after the first access is where all processing ends and the data is displayed with correct values
When accessing the spreadsheet again, it starts all over again... where the data will be processed again
Could anyone help me in this case?
Related
I have 3 streams each for 3 different tables that are loaded batch once per day. Perhaps any day one of the tables doesn't load any data but the others yes.
I have a task that is triggered when all 3 streams have data and with a cursor and a for loops over each process date (column), and triggers a stored procedure ONLY if in the 3 streams there is data on that same process date.
All that is working fine, but the problem is in the case when for one date there is data for each stream but for another date theres data for only two of the streams. The thing is that when de SP is called, the data for the process date that is in the 3 streams is loaded in the final table (with a merge into) and the data for the other process date that is only present in two of the streams isn't, BUT the data of the 3 streams is deleted!
How can i resolve this? Copying the info of the streams in a persistent table and working with this ones? I was hopping that streams has a feature that i wasn't aware of.
Detailed above in the post
I have been using IMPORTRANGE and QUERY extensively to connect all of my spreadsheets for a while now. But recently noticed that IMPORTRANGE and QUERY will not return proper data unless the source Sheet is open. Also, the data used to automatically update (every 30 min or so, whatever the default refresh rate is) in the background for IMPORTRANGE, but now it will only update if I manually open the Sheet and it will display "Loading...." before returning the data.
Is anybody else having issues with these two functions?
This answer explains the issue you encountered.
In summary:
It doesn't update when the sheet isn't opened.
Recalculation only happens when sheet is opened.
Functions that pull data from outside the spreadsheet recalculate at the following times:
ImportRange: 30 minutes
ImportHtml, ImportFeed, ImportData, ImportXml: 1 hour
GoogleFinance: may be delayed up to 20 minutes
Alternative solution:
You can use time driven triggers and update those values every N minutes/hours instead BUT you will have to create a script for that.
Everytime you trigger, you'd have to use setFormula on every cell you used your importrange and query.
References:
setFormula
Choose how often formulas calculate
Time Driven Triggers
ImportRANGE returns a #NAME error occasionally as it updates itself every 30 mins.
I took a look through Google Sheet Script Returning #NAME? but there sadly wasn't any solutions. The best guess at a response was about how google sheets loads custom formulas, but since =IMPORTRANGE() is a vanilla formula it shouldn't have a problem with that.
My formula is
=IMPORTRANGE("URLHERE",(A5&"!"&"D1"))
First the URL, then the final section allowing it to request data from a different sheet in the file for every line. I have setup the sheets that contain the source data to be called 1,2,3,4, ect up to 100 to accomodate for this.
I am trying to import data from a different sheet that has a custom script running to import JSON data. The JSON is imported perfectly and once a day a macro will run that updates the JSON values. I have a separate sheet that I don't want to run the script on, so I am using IMPORTRANGE to get the data from JSON imports. Every 30 minutes Importrange updates itself and it researches for the values. It would work fine for me for this to be once a day, however, I can't find a way to change that.
Most of the time it has no problems, occasionally it has a problem with a couple of the imports but most are fine. A couple of times it has hit #NAME on every single IMPORTRANGE.
My goal is to add +1 every day to a global variable in Firebase to track how many days have passed. I'm building an app that give new facts every day, and at the 19:00 UTC time marker, I want the case statement number (the day global day variable) to increment by +1.
Some have suggested that I compare two dates and get the days that have passed that way. If I were to do that, I could hard code the initial time when I first want the app to start at 19:00 some day. Then when the function reached1900UTC() is called everyday thereafter, compare it to a Firebase timestamp of that current time which should be 19:00. In theory, it should show that 1 day or more day has passed.
This is the best solution so far, thanks to #DavidSeek and #Jay, but I would still like to figure it out with concurrent writes if anyone has a solution in that front. Until then, I'm marking David's answer as the correct one.
How would I make it so it can't increase more than +1 if multiple people call this? Because my fear is that, when say, 100 people calls this function, it increases by + 1 for every person that has called it.
My app works on a global time, and this function is called every day at 19:00 UTC. So when that function is called I want the day count to increase by one.
You should use transactions to handle concurrent writes:
https://firebase.google.com/docs/database/ios/read-and-write#save_data_as_transactions
You may know this but Firebase doesn't have a way to auto-increment a counter as there's no server side logic, so having a counter increment at 19:00 UTC isn't going to be possible without interaction from a client that happens to be logged on at that time.
That being said, it's fairly straightforward to have the first user that logs in increment that counter - then any other clients logging in after that would not increment it and would have access to that day's new content.
Take a look at Zapier.com - that's a service that can fire time based triggers for your app which may do the trick.
As of this writing, Zapier and Firebase don't play nice together, however, there are a number of other trigger options that Zapier can do with your app while continuing to use Firebase for storage.
One other thought...
Instead of dealing with counters and counting days, why not just have each day's content stored within a node for each day and when each user logs on, the app get's that days content:
2016-10-10
fact: "The Earth is an Oblate Spheroid"
2016-10-11
fact: "Milli Vanilli is neither a Milli or a Vanilli. Discuss."
2016-10-12
fact: "George Washington did not have a middle name"
This would eliminate a number of issues such as counters, updates, concurrent writing to Firebase, triggers etc.
It's also dynamic and expandable and a user could easily see that day's facts or the fact for any prior day(s)
I'm trying to split your question into different sections.
1) If you want to use a global variable to count the days from, let's say, today. Then I would set a timestamp hardcoded into the App that sets the NSDate.
Then In my App, when I need to know the days that have been passed by, I would call a function counting the days from the timestamp to NSDate().
2) If you have a function in your App that counts a +1 into a Firebase, then your fear is correct. It would count +1 for every person that uses the App.
3) If you want every User to have a variable count since when they use their App, then I would handle User registration. So I have a "UserID" and then I would set a Firebase tree like that:
UserID
------->
FirstOpen
-------> Date
That way you could handle each User's first open.
Then you are able to set a timestamp AND call +1 for every user independently. Because then you set the +1 for every user into their UserID .child
I'm measuring how long users are logged into a service. Every minute, for each user, their new total online time is sent to InfluxDB. I'd like to graph, in Grafana, the cumulative online time for all users.
What kind of query would I need to do that? I initially thought that I'd want sum(onlineTime) and group by time(1m), but I realized that's summing the values within that timeframe, not summing the totals of all users, so when a user wasn't logged in, the total would drop, because there were not data points for them.
I'm a bit confused about what I'm doing now. If I'm sending the wrong data, I can change that too.
So this depends on the time data you send back to InfluxDB
The time data is equal to the total time spent till that instant of time
In this case you would have to take the "last" value and add it up for all the users
The time is equal to the small increments
In this case you would have to add this multiple incremental value for a period of time.