After you have accessed your data on Google Search Console, you will have to transform it based on two main factors:
1. The limitations of the database that is going to be used
2. The type of analysis that you plan to perform
Each system has specific limitations on the data types and data structures that it supports. If you want to push data into Google BigQuery, you can send nested data like JSON directly. But when you are dealing with tabular data stores, like PostgreSQL, this is not an option. Instead, you will have to flatten out your data before loading it into the database.
Also, you have to choose the right data types. Again, depending on the system you will send data to and the data types that the API exposes to you, you will have to make the right choices. These choices are important because they can limit your queries’ and limit your analysts on what they can do directly out of the database.
Google Search Console data is modeled around the concept of a report, just like Google Analytics but with a much more limited number of dimensions and metrics.
At the end you will need to map one report to a table on your database and make sure that all data is stored into it. Dimensions and metrics will become columns of the tables.
You need to take special care that the reports you will be getting from Google Search Console do not have primary keys given by Google to avoid duplicates.
For more information on how you can query your Search Analytics data, please see here.
Data in Snowflake is organized around tables with a well-defined set of columns with each one having a specific data type.
Snowflake supports a rich set of data types. It is worth mentioning that a number of semi-structured data types are also supported. With Snowflake, it is possible to directly load data in JSON, Avro, ORC, Parquet, or XML format. Hierarchical data is treated as a first-class citizen, similar to what Google BigQuery offers.
There is also one notable common data type that Snowflake does not support. LOB or large object data type is not supported. Instead, you should use a BINARY or VARCHAR type. But these types are not that useful for data warehouse use cases.
Of course, you will need to ensure that as data types from the Google Search Console API might change, you will adapt your database tables accordingly, there’s no such thing as automatic data type casting.
After you have a complete and well-defined data model or schema for Snowflake, you can move forward and start loading your data into the database.