I have a Sheet with data coming from a G-Form response. Using the Sheets' data connector I was able to make a connection to a BigQuery Table, but the Sheets data is not importing, and am unable to figure out why.
Sheets Data from Forms
TimeStamp | Email Address | Check box if info provided
10/02/2021 10:28:32 | jondoe#gmail.com | Name, Address, City
10/02/2021 12:32:44 | jaxdoe#gmail.com | Name, Address, City, Zip
10/03/2021 01:22:11 | jandoe#gmail.com | Name
BigQuery Table Fields and Schema
Field name | Type | Mode
Timestamp | DATETIME | NULLABLE
Email_Address | STRING(255)| NULLABLE
Response | STRING | NULLABLE
Data Preview after refreshing
It's not possible to directly add data from sheets to BigQuery. For your requirement you can import the sheet to drive and export data to bigquery using Add data option in BigQuery.
You can connect Public Dataset tables and other tables in BigQuery to Sheets as you are doing following this document.
Related
I have a Google Sheet linked to a Google form to record user input in a way that is easily manipulatable. For my example purposes, let's say this is simply a form to get user comments.
In this example, I have the sheet titled "Data" that retrieves the form submissions. This has the following headers:
|-----------|--------|-----------|
| Timestamp | User | Comment |
|-----------|--------|-----------|
New form submissions are actively being added to this sheet.
I am pulling this data to another sheet, titled "Report," via a QUERY FUNCTION. I would like to sort these comments under their select user. Here is the layout of my Report sheet:
|----------|---------|
| User 1 | |
|----------|---------|
| | QUERY |
|----------|---------|
| User 2 | |
|----------|---------|
| | QUERY |
|----------|---------|
| User 3 | |
|----------|---------|
| | QUERY |
|----------|---------|
The cells with "QUERY" will have something along these lines:
=QUERY(Data!A1:C,"Select * Where B = 'User 1'", 1)
What I want to do is have new rows dynamically added to the associated query as each user sends in multiple submissions; that way there is enough room for the Query data and I won't get an error.
How can this be done?
If you are open to slighly change the report structure in order to keep things simple use the ORDER BY clause of Google Query Language in a single formula using the QUERY function
The formula will be something like this:
=QUERY({Data!B1:B,Data!A1:C},"Select * Order By Col1", 1)
Then you could use conditional formatting to set the font and background color to be the same if the cell value is the same of the above cell.
If you really need to have a stepped report, then add a set of rows having only the User name. Example:
=ArrayFormula(QUERY(
{Data!B:B,Data!A:C;UNIQUE({Data!B2:B,IF(LEN(Data!B2:B),{"","",""})})},
"Select * Where Col1 is not null Order By Col1, Col2", 1
))
Resources
Google Query Language
Using arrays in Google Sheets
I have some data that was set up poorly coming from Firebase Realtime Database. I will be updating the way the data is stored to make it easier to work with in the future, but for the data that exists I'd like to find a way to make it readable for a report. The data is coming in from the Realtime Database API into Google sheets, and it looks like this right now:
10/01/2020 abc123 Email | 10/01/2020 abc123 Status | 10/01/2020 abc123 Time | 10/01/2020 def456 Email | 10/01/2020 def456 Status | 10/01/2020 def456 Time
fake#email.com Clocking In 12:10:50 fake#email.com --------Clocking Out -----------15:16:53 GMT-0400 (EDT)
I did my best to get format that like a table, hopefully it gets the point across (the hyphens were necessary to keep formatting).
Anyway, the object with headers like "Date random letters and numbers for id Field". Is there any way to group it more so it's like:
ID | Email | Status | Time
Date abc123 | fake#email.com | Clocking In | 12:10:50
Date def456 | fake#email.com | Clocking Out | 15:16:53
I've got hundreds of these, so I'm hoping to find a way to automate it and make this data readable for other people
On a new tab called MK.Help in the sample sheet you provided, This formula will grab ONLY every 3rd column and transposes it to show the email addresses.
=TRANSPOSE(FILTER(Sheet1!2:2,MOD(COLUMN(Sheet1!2:2),3)=1))
Similarly, this one will grab every third, but a starting in a different place to grab the In/Out.
=TRANSPOSE(FILTER(Sheet1!2:2,MOD(COLUMN(Sheet1!2:2),3)=2))
This one will do the same for the Times, but it first Adds the date to it so that you can get a full timestamp. It uses some text manipulation functions, specifically LEFT() to only grab the data from each row necessary to construct a proper timestamp
=TRANSPOSE(FILTER(IFERROR(1/(1/(LEFT(Sheet1!1:1,16)&LEFT(Sheet1!2:2,8)))),MOD(COLUMN(Sheet1!2:2),3)=0))
Looking for a bit of help creating a small database for orders.
So currently I'm parsing orders I receive to a order list on google sheets.
I have a few columns like customer name, date, reference number, address, etc.
Trying to have 1 main order sheet with all parsed orders, then have orders sorted by month in separate sheets and removing duplicate order entries.
You can write the script in given documentation for removing duplicates:
https://developers.google.com/apps-script/articles/removing_duplicates?hl=zh-TW
And For sorting of order:
var ss = SpreadsheetApp.getActiveSpreadsheet();//create object for google spreadsheet.
var timeSheet= ss.getSheetByName("sheetName");//create object for particuler sheet
var timeSheetLastRow = timeSheet.getLastRow();
timeSheet.getRange("A3:BC"+timeSheetLastRow).sort(7);// 7 is column number
You can try those things merge code for your sheet.
Let's create a dummy data that matches your content in Google Sheet.
A | B | C | D
-------------------------------------------------------
customer name | date | reference number | address
ABC | 1-1-1990 | 00100 | Home Towm
EFG | 3-2-1991 | 00200 | Farm Towm
HIJ | 2-3-1990 | 00300 | Your Towm
ABC | 1-1-1990 | 00100 | Home Towm
Let's assume the data above is added manually, and there is another sheet in the same SpreadSheet where sorted & unique data will be added from above sheet.
Formula: Unique(Sort('Sheet Name'!A:D, sort_column, is_ascending))
Example: Unique(Sort('Sheet Name'!A:D, 2, True))
In one of our project website, we are about to use Google spread sheet for our clients to enter some information and do some spread sheet work. So using Google APIs We can create spread sheet on our website and allow users to enter details in it. But my question is that is it possible to lock rows and columns so users can only enter data in the field they are allowed to modify?
For example,
--------------------------
| Car Rent | |
| Total Gas | |
| Insurance | |
| Commission | 1% |
--------------------------
Lets say this is our basic template for spread sheet for all of our users. The can enter Car rent, total gas and insurance value but they are not allowed to modify anything else, including row headers or any other empty cell outside this box. So is there anyway to lock it for users in spread sheet? Can anyone point me to guide or api details?
Thanks
I have a sheet name 'test'
code | count
HHHD |
YTSS |
YDUS |
and i have a second sheet name 'abc'
code | count | name
HHHD | 1 | sts
YTSS | 2 | other_name
YDUS | 6 | other_name_2
How create array formula or which function use to make in test B2 cell when code from test will exist in abc.cell then get data abc.count and insert to test.count
How can i do this ?
Classic VLOOKUP case:
But, I'll use LOOKUP here
Test B2=
=ARRAYFORMULA(LOOKUP(A2:A7,'abc'!A2:B7))
The QUERY function offers a short, readable way to analyze data. This function uses the principles of Structured Query Language (SQL) to do searches.
Parts of a QUERY formula
A QUERY formula is formatted as =QUERY(data, query, [headers]).
Full Documentation : Here