Skip to main content

πŸ”’ GA4 | Dataform

#3 - How to point Dataform to your GA4 BigQuery export data source using declarations

In the third part of our Dataform tutorial series, we focus on linking Dataform to your GA4 BigQuery export data source, by creating a declaration file in your development workspace. This section is crucial for informing Dataform about the location of your GA4 export data.

Essentially you're setting up the groundwork to create and run your first model in Dataform.

πŸ’‘
This article is part of a series of bite-sized tutorials on creating and maintaining a GA4 export SQL workflow in Google BigQuery using Dataform.

Although we have set up and initialized our development environment, Dataform still has no clue where to find our GA4 BigQuery export data.

Let's create a new directory in definitions, called source. Add the directory path definitions/source. Click Create directory.

In the new folder source, create a new .sqlx file, called ga4_export. To do so, add the file path definitions/source/ga4_export.sqlx (don't forget to add the extension). Click Create file.

In this empty file we can point Dataform to the GA4 export data. Make sure to use your own credentials: