From the course: Build a No-Code ETL Pipeline with Google BigQuery

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Process data, part one

Process data, part one

- [Instructor] Now I need to write the code that will get the data from the staging table and process it so that it's ready to enter the analytics table. And I have written the query here. And as you can see, I am getting data from the staging table. And then I am selecting every field in my staging table. And for most fields, I am running the CAST function. And what the CAST function does is that it takes a field which has a specific data type, and then it converts this field into another data type. So in the case of the field Date, which is a text field in the staging table, we are converting this field to TIMESTAMP with the CAST function. And then, with the AS 'Date' part, we are making sure that the new field is also called Date. For Open, High, Low, and Close, which, remember, they are prices, we are casting them to NUMERIC. And once again, we are making sure that after this operation, they maintain their original label. For Volume, we are casting it to integer. And for…

Contents