This is your go-to place to easily set up a data stack using Airbyte, dbt, BigQuery, and Dagster. This Quickstart is all about making things easy, getting you started quickly and showing you how smoothly all these tools can work together!
Download our free guide and discover the best approach for your needs, whether it's building your ELT solution in-house or opting for Airbyte Open Source or Airbyte Cloud.
Welcome to the "E-Commerce Analytics Stack" Quickstart! 🌟 This is your go-to place to easily set up a data stack using Airbyte, dbt, BigQuery, and Dagster. With this setup, you can pull fake e-commerce data, put it into BigQuery, and play around with it using dbt and Dagster.
This Quickstart is all about making things easy, getting you started quickly and showing you how smoothly all these tools can work together!
Below is a visual representation of how data flows through our integrated tools in this Quickstart. This comes from Dagster's global asset lineage view:
Before you embark on this integration, ensure you have the following set up and ready:
Get the project up and running on your local machine by following these steps:
You can use the following commands, just make sure to adapt to your specific python installation.
For Linux and Mac:
For Windows:
To set up your Airbyte connectors, you can choose to do it via Terraform, or the UI. Choose one of the two following options.
Airbyte allows you to create connectors for sources and destinations via Terraform, facilitating data synchronization between various platforms. Here's how you can set this up:
Within the <span class="text-style-code">infra/airbyte</span> directory, you'll find three crucial Terraform files:
Adjust the configurations in these files to suit your project's needs:
Provide credentials for your BigQuery connection in the <span class="text-style-code">main.tf</span> file.
Alternatively, you can utilize the <span class="text-style-code">variables.tf</span> file to manage these credentials: You’ll be prompted to enter the credentials when you execute terraform plan and terraform apply. If going for this option, just move to the next step. If you don’t want to use variables, remove them from the file.
This step prepares Terraform to create the resources defined in your configuration files.
Before applying any changes, review the plan to understand what Terraform will do.
After reviewing and confirming the plan, apply the Terraform configurations to create the necessary Airbyte resources.
Once Terraform completes its tasks, navigate to the Airbyte UI. Here, you should see your source and destination connectors, as well as the connection between them, set up and ready to go 🎉.
Start by launching the Airbyte UI by going to http://localhost:8000/ in your browser. Then:
That’s it! Your connection is set up and ready to go! 🎉
dbt (data build tool) allows you to transform your data by writing, documenting, and executing SQL workflows. Setting up the dbt project requires specifying connection details for your data platform, in this case, BigQuery. Here’s a step-by-step guide to help you set this up:
Move to the directory containing the dbt configuration:
If you want to avoid hardcoding credentials in the <span class="text-style-code">profiles.yml</span> file, you can leverage environment variables. An example of how to use them in this file is provided for the keyfile key.
Once you’ve updated the connection details, you can test the connection to your BigQuery instance using:
If everything is set up correctly, this command should report a successful connection to BigQuery 🎉.
Dagster is a modern data orchestrator designed to help you build, test, and monitor your data workflows. In this section, we'll walk you through setting up Dagster to oversee both the Airbyte and dbt workflows:
Switch to the directory containing the Dagster orchestration configurations:
Dagster requires certain environment variables to be set to interact with other tools like dbt and Airbyte. Set the following variables:
Note: The <span class="text-style-code">AIRBYTE_PASSWORD</span> is set to password as a default for local Airbyte instances. If you've changed this during your Airbyte setup, ensure you use the appropriate password here.
With the environment variables in place, kick-start the Dagster UI:
Open your browser and navigate to http://127.0.0.1:3000. Here, you should see assets for both Airbyte and dbt. To get an overview of how these assets interrelate, click on view global asset lineage at the top right corner of the Dagster UI. This will give you a clear picture of the data lineage, visualizing how data flows between the tools.
In the Dagster UI, click on "Materialize all". This should trigger the full pipeline. First the Airbyte sync to extract data from Faker and load it into BigQuery, and then dbt to transform the raw data, materializing the staging and marts models.
You can go to the Airbyte UI and confirm a sync is running, and then, once the dbt jobs have run, go to your BigQuery console and check the views have been created in the transformed data dataset.
Congratulations on deploying and running the E-commerce Analytics Quistart! 🎉 Here are some suggestions on what you can explore next to dive deeper and get more out of your project:
Dive into the datasets in BigQuery, run some queries, and explore the data you've collected and transformed. This is your chance to uncover insights and understand the data better!
Review the transformations you’ve applied using dbt. Try optimizing the models or create new ones based on your evolving needs and insights you want to extract.
Add more data sources to Airbyte. Explore different types of sources available, and see how they can enrich your existing datasets and broaden your analytical capabilities.
Implement data quality tests in dbt to ensure the reliability and accuracy of your transformations. Use dbt's testing features to validate your data and catch issues early on.
Explore more advanced Dagster configurations and setups to automate your pipelines further and set up monitoring and alerting to be informed of any issues immediately.
Consider scaling your setup to handle more data, more sources, and more transformations. Optimize your configurations and resources to ensure smooth and efficient processing of larger datasets.
Share your learnings, optimizations, and new configurations with the community. Contribute to the respective tool’s communities and help others learn and grow.
Download our free guide and discover the best approach for your needs, whether it's building your ELT solution in-house or opting for Airbyte Open Source or Airbyte Cloud.