Google Bigquery: Not adding data. No errors - google-apps-script

I had a bigquery table that I was adding data to regularly over the past few months. Yesterday I created a new table in the same dataset to handle some other data. However, when I tried adding data, nothing happened.
I am adding the data using the function "BigQuery.Tabledata.insertAll" in a script I made and the response I get is "{kind=bigquery#tableDataInsertAllResponse}", which is suppossed to mean that there were no errors. When I queried SELECT * FROM [<MyDataSet>.<MyTableID>] the table in the UI, it said there were 0 results.
Soon after, I also noticed that the original table wasn't getting any new data. I tried deleting the new table I made but that hasn't fixed it.
The scripts are still working properly and I know the JSON is in the correct format. I even tried adding one row with one field at a time and that didn't work. {kind=bigquery#tableDataInsertAllRequest, rows=[{json={tranID=3427412}, insertId=row3427413}]}
Anyone encountered this problem?
Also this is my first time posting here so if I didn't follow the rules or provide enough information please let me know.
Thanks

Related

After Delete Data Macro

I am running into a problem doing something very simple with MS Access data macros. When a record row is deleted from T_Roster, I want it copied to t_Deleted. I know there are a plethora of other and better ways to accomplish this however, the requirements for this are such that a data macro is required. The end user/manager does not want me to add columns to the roster table or use a form (both of which I had initially suggested). That said, I have been scouring the internet for a solution and see that this question has been answered however, I have not been able to get the simple macro to work on my end. I have finally worked up the nerve to ask the question here again so please be kind.
There are only 2 tables in this DB. t_Deleted and T_Roster
I have attached a screen shot of what my current macro looks like. In the interests of keeping things simple, I only want the "OCIO_Name" to copy over for now. I assume that if this test works, the rest of the fields will not be an issue.
Table properties are as follows:
T_Roster Table Properties
t_Deleted Table Properties
Macro in T_Roster:
T_Roster AfterDelete Macro
Can anyone tell me what is wrong with what they see?
edit Does not work means that t_Deleted is not updated when I delete a record from T_roster.
Fields set as required will prevent creating new record unless data is provided for them. Either don't set as required or provide data.

Invalid argument Error when attempting UPDATE query on linked SharePoint list

I'm running an UPDATE query from Access 2010 on a linked SharePoint 2013 list, but am getting an Invalid Argument error.
My Access DB is about 200 MB, I have tried compacting and repairing the DB. The query "runs" successfully when I select "View"--the error only appears when I actually click "Run". The query I'm running goes like:
UPDATE
SP_Table INNER JOIN Access_Table on SP_Table.ID1 = Access_Table.ID1
SET
SP_Table.Field1 = Access_Table.Field1,
SP_Table.Field2 = Access_Table.Field2,
--etc...
WHERE
(SP_Table.Field1 <> Access_Table.Field1 AND SP_Table.ID1 = Access_Table.ID1)
OR
(SP_Table.Field2 <> Access_Table.Field2 AND SP_Table.ID1 = Access_Table.ID1)
OR
--etc...
;
This question seems to have the same problem, and the solution even seems plausible, but they're both distinctly lacking in detail. I'm not even sure how to view the PK on my SharePoint list, or how to tell if it's the problem.
Any ideas on how to resolve the error?
I was able to resolve the error, though I'm still not sure what was causing it.
I went through all of the fields in my WHERE clause, and narrowed the issue down to two fields that would cause the query to generate the error if they were included. I compared the fields in both tables, making sure that all of the field settings were identical, but wasn't able to make the query work with them.
Fortunately for me, these fields were not particularly vital, and I can leave them out, but if anyone else has any thoughts, I'd love to have a deeper understanding about what's causing the issue.
EDIT
The error cropped up again in a field that I did care about, so I had to figure out what was causing it. It looks like the "Invalid Argument" error can be caused by a few things, including having the size of either the SharePoint list, SharePoint site, or Access DB being too large. In my case, it appears that I was a victim of corrupt data.
After narrowing down which field was causing the issue, I went through and updated most of the data elements manually on the SharePoint list. Doing that apparently overwrote the corrupt data element that was causing my error, because when I ran the query again, the last few records updated without any issue.
Bottom line, if this happens again, I'm going to check the size of the SP list (no more than 5,000 rows), the size of the SP site (ymmv), the size of the Access DB (no more than 2GB) and then narrow down which field is giving me the error, and try replacing those data elements one at a time until I find the corrupted data element.
I found that in Sharepoint Library -- Version Settings -- Require documents to be checked out set to Yes caused this issue. I set this radio button to No and now I can update SharePoint Library fields from MS Access.
I came across the same problem. Turns out I was returning all rows from one table and only those that matched in the other. There was a missing row in the second table. Change the query to return only rows that match both tables and the problem was sorted.

Access VBA to find & move recurring value

Good Morning,
I'm fairly new to Access VBA and I've been trying to find a solution to a problem:
I've created a form from which users upload an excel file to a database. File open prompt appears, user selects the file, temp table gets created and data gets pulled to this table. From there a set of macros populate the required fields and push the complete set to a perm table and then temp table gets deleted. Now I would like to take it a step further and try and count how many times a value has been uploaded to the table...
Lets say that the value appears in the table twice already, then if user tries to upload the same value for the third time it will be uploaded to a different table. Bear in mind that the file which users will upload may contain values that will be uploaded for the first, second, third, etc. time.
Do you have any suggestions or solutions to my problem? Is it even possible? If yes then how can I make Access to distinguish which records are being uploaded for the first, second, third, etc. time and follow appropriate paths?
I've been scouting the internet for several days now, but no one seems to have such issue.
Thank you in advance for replies.
I'm not sure I follow. You are essentially trying to prevent inserting duplicate data to a production table and if a duplicate is encountered at the record to a different table?

Access Web Application Data Macro to Sum values in Query and return as variable

I am working on a small application in Access Services on SharePoint to log colleagues leave requests, and I need to work out a data macro to calculate how many days of leave they have remaining from their allowance.
I have a table [Colleagues] with all of the user data, for simplicity I'll reduce it to [Email] and [Allowance] in days. I have another table which stores the requests [Requests] including the number of days to deduct in each approved leave request [Days Requested].
I have set up a query that returns all approved requests for the colleague and I would like to use a data macro that is triggered to run when the colleague logs in. As you cannot use aggregate functions in Web Applications, I am currently using ForEachRecord in the query to total the number of deductible days, however I cannot work out how to return that to a field in the [Colleague] record.
According to the Access help, I should be able to set the value to a LocalVar and use it in expressions as simply as referencing [Deductible Days], however this is not working.
Any help?
I finally worked this out after much tinkering.
In my query I included the [Colleague Email] field as well as the [Days Requested] field, and then when my Application loads it navigates to a form created from the [Colleagues] table. I have modified the Data Source of the form to link the [Email] field in the query results to the [Email] field in the [Colleagues] form.
Following this I was able to create an unbound textbox with the data source =Sum([Days Requested]) referring to the relevant field in the query. Voila! I now have the value to play around with in my application.
Hope that helps, took a lot of fiddling around. No data macros needed after all, but its a method I shall remember in future, opens up a lot of possibilities.
If I understand your situation correctly, I was faced with a very similar problem.
I believe the solution used here will work for you. It involves using a query to Sum up the values (we would use Sum where he used Count), use a Data Macro to run the query and then have have an On Insert/On Update trigger the Data Macro:
http://devspoint.wordpress.com/2014/03/26/validating-data-with-data-macros-in-access-services-2013/
Let me know if this works for you. It worked for me!

Weird SQL Behaviour

A view that hase been running for years selects specific columns from several tables and joins them.
Recently, I added a column to one of the tables, and the vew no longer worked properly.
One of the columns in the query result contained data that was from another column in the table.
I rebuilt the view from a script - no changes to the script - and the problem went away.
The view does not look at the new column.
What is going on?
Your query is using SELECT *. You simply need to recomple it.
When the view is compiled, it compiles the offset of the fields in the record, rather than the names of the field. If the underlying table changes . . . well, the offsets no longer go to the correct positions.
I, unfortunately, learned this once upon a time after about 5 hours of trying to figure out why a number was getting a numeric error -- starting at 6:00 a.m. So, this problem can even effect different types of data.
I do the recompile by scripting out the view as an alter, using SQL Server Management Studio, and then running the code (without any changes). However, you could change the code by putting in the explicit list of columns, and not having this problem in the future.
You can also set up a script that recompiles all your views every evening, to prevent this problem in the future. We now have such a script as well.