After you have accessed the data on Freshdesk, you will have to transform it based on two main factors,
- The limitations of the database that the data will be loaded onto
- The type of analysis that you plan to perform
Each system has specific limitations on the data types and data structures that it supports. For example, if you want to push data into Google BigQuery, you can send nested data like JSON directly.
Of course, when you deal with tabular data stores, like Microsoft SQL Server, this is not an option. Instead, you will have to flatten out the data, just as in the case of JSON, before loading it into the database.
Amazon Redshift is built around industry-standard SQL with added functionality to manage very large data sets and high-performance analysis. So, to load data into it, you will have to follow its data model, a typical relational database model. The data you extract from a data source should be mapped into tables and columns. You can consider the table as a map to the resource you want to store and columns the attributes of that resource.
Since data is probably coming in a representation like JSON that supports a much smaller range of data types you have to be really careful with data being fed to Redshift. Also, you need to make sure that you have mapped your types into one of the data types supported by Redshift.
Designing a Schema for Redshift and mapping the data from a data source to it is a process that you should take seriously as it can both affect the performance of your cluster and the questions that you can answer. It’s always a good idea to have in your mind the best practices that Amazon has published regarding the design of a Redshift database.
When you have concluded on the design of your database, you need to load any data on one of the data sources that are supported as input by Redshift; these are the following:
Again, depending on the system you will send the 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 the expressivity of your queries and limit your analysts on what they can do directly out of the database.
Freshdesk has a very limited set of available data types, which means that your work to do these mappings is much straightforward and equally important with any other case of a data source.
Due to the rich and complex data model that Freshdesk follows, some of the provided resources might have to be flattened out and be pushed in more than one table.