Skip to content
Advertisement

Tag: google-bigquery

Is there a way to add “Virtual” Row in BigQuery?

What I mean by “virtual” is the following: For example, you have the following table, And when you run the following query: it returns the new table by adding “virtual” column My question is, is there a way to add a new “virtual” row, I mean without actually modifying the table or using the INSERT statement. I think the code

How to compare DD/MM dates in BigQuery?

I’m trying to compare two dates without the year, only the day and the month (DD/MM) when for example 30/04 < 02/05. I want to be able to say wether a date is previous or not to another date based only on the day and the month without paying attention to the year. I tried to use FORMAT_DATE(“%d/%m”, DATE(“2021-04-30”)) <=

Using LAG() on an UPDATE with CASE statements

I have a query on a Python Dashboard (using Plotly/Dash) that let users set some variables and update a table in BigQuery. I’m having trouble with one query that has some CASE statements and using LAG(). I wrote the following query: But I got the following error: “Analytic function not allowed in UPDATE clause…”. I researched about it and it’s

How to pivot in BigQuery?

I’m doing validations between source tables and destination tables in different processes in a Data Lake. I work with StandardSQL in BigQuery, and I do the comparisons between both tables with this query: And this is the result: Is there a way to normalize and denormalize this information as follows? I have to evaluate several processes that have more or

Advertisement