Google BigQuery

Syntax to find a table in Big-Query

SELECT *
FROM Schemaname.__TABLES__ where table_id like ‘%PARTNER_Account%’

how to create table in google big-query using file from GC bucket for any delimiter 

Deleting data in BigQuery
delete from `data_migration.GC_Table_File` ExpectedRevenue where 1=1

REGEXP_EXTRACT in BigQuery
sample data:- “Kumar:comes home”
required output:- comes home
Select REGEXP_EXTRACT(string_field_0, r’:(.*)’) from table

Second Method:-
SUBSTR(‘Kumar:comes home’, STRPOS(‘Kumar:comes home’, ‘:’) +1, LENGTH(‘Kumar:comes home’))

Instr() function in BiqQuery
Select STRPOS(‘Kumar:comes home’, ‘:’) from table

Advertisements