Quickstart π
This guide will walk you through setting up a sample project in Ascend and running your first flow.
Prerequisitesβ
Before getting started, you will need to make sure you have the following configured in your Ascend Instance:
- Your Instance Vault and Instance Store configured
- Your Environment Vault and Data Plane configured
- A Git Repository, Project, and Workspace
Cloning the Quickstart Project into your Repositoryβ
To get you started on setting up your Ascend project, we have provided a quickstart project that you can clone and copy into your repository. This will give you a good starting point for your own project. The following steps in this guide will reference this quickstart project.
- In your terminal, run the following commands to clone the quickstart project
git clone git@github.com:ascend-io/ascend-community.git
- Clone your repository in the same directory:
git clone {your-repo-ssh-url} # make sure you have set up local ssh keys
cd {your-repo-name}
- Copy the quickstart project folder into your own repository
cp -r ../ascend-community/quickstart quickstart
git add .
git commit -m "Initial commit"
git push
Setting up your Project and Workspaceβ
Let's make sure the your Project is pointing to the correct folder in you repository.
- Log in to your Ascend Instance and navigate to your Project Settings (Ascend.io Instance: <instance-name> -> Settings -> Project).
- You should see the project you created as part of setting up your Project. Click on the project to open the project settings.
- For the project root, ensure that it is
quickstart
. Note: If you used a different directory for your project in the above step, ensure that directory is specified here.
Now let's ensure that your Workspace is using the correct profile.
- In the settings page, click on the Workspace tab.
- You should see a the Workspace you created as part of setting up your Workspace. Click on the Workspace to open the workspace settings.
- Under profile, you should already see the value
prod
. If not, click on the field and a drop down menu will list the available profiles in your project. The Quickstart project will have a single profile calledprod
. Selectprod
and then Save.
Navigating your Workspaceβ
- Navigate back to your homepage by click the Ascend icon in the top left corner.
- Here you can see all your Ascend Projects and Workspaces. Click on your Workspace to open it.
- Welcome to your workspace! This is where you'll be building and running your Ascend Flows.
- On the left, you'll see your Project file tree, including all the folders and files needed for your Quickstart project. Let's take a look at each of the folders:
flows
: This is where you will store your actual flow definitions. There is one flow in here calledquickstart
. Each flow hasyaml
definition file with the same name and acomponents
folder that contains component files that can either beyaml
,sql
, orpython
, depending on whether the
flows
βββ quickstart/
βββ components/
βΒ Β βββ lake_reader.yaml
βΒ Β βββ my_python_transform.py
βΒ Β βββ sample_sql_transform.sql.jinja
βββ quickstart.yaml
vaults
: This is where you configure your Ascend Project to use the Environment Vault you set up earlier.
vaults/
βββ my_vault.yaml
connections
: This is where you will store configuration for any connections to systems outside of Ascend, including the connection to your Data Plane.
connections/
βββ local_files.yaml
βββ my_data_plane.yaml
profiles
: This is where you will store your Profile configurations. Profiles are used to defines the parameters and Data Plane with which your flows will run.
profiles/
βββ prod.yaml
Configure your Project Vaultβ
- Click into the
vaults
folder. - You will see a file called
my_vault.yaml
. This will be the file where we will define your vault. Click on this file to open it in the editor. - You will see two options for you vault,
azure_key_vault
andgcp_secret_manager
. Each of these values also has a vault or project name, depending on the vault type. These values have been set using Ascend Parameters, which use the syntax${parameter.<parameter-name>}
and are defined in your profile. You will set these in the next step. - Delete the irrelevant Vault definition, keeping only the definition for the Vault you configured during the Environment Vault Setup. (If you are unsure which Vault is configured, you can check in your Environment Settings.)
- Click the
Save
button to save the file.
Setting up your Data Plane Connectionβ
Next, you'll set up the connection to use for your Data Plane. This will determine where your data will be stored and processed.
- Navigate to the
connections
folder and clickmy_data_plane.yaml
to open the file in the editor. - You will again see two options here, one for a BigQuery Data Plane under the
bigquery
key, and the other for a Snowflake Data Plane, under thesnowflake
key. You'll notice again that the values for the connection have been added as parameters that you will be setting in your profile. You will also notice another type of parameter used for injecting secrets into our configuration. This uses the syntax${secret.<vault-name>.<secret-name>}
. - Delete the connection configuration for the connection you will not be using, and click
Save
to save your changes.
For the secret values, in this case bigquery.key
and snowflake.password
, ensure that the key here matches the key under which the secret is stored in your vault.
For example, if you are using Snowflake for your Data Plane, ensure that the secret is stored in your vault with the key ascend-env-prod-snowflake-password
. If the key is different, you can update the value in the connection yaml.
Configuring your Profileβ
Finally, you will set up your profile. Profiles are used to store run-time configuration of your Ascend Flows, such as parameters to use and which connection to use as a Data Plane. By defining different profiles, you have the ability to run dynamic flows with different configurations.
- Navigate to the
profiles
folder and click onprod.yaml
to open the file in the editor. - You will see that the parameters mentioned earlier are defined here under
profile.parameters
. The Data Plane for your flow is also configured to use the connectionmy_data_plane
. - There are two possible configuration options presented:
Azure + Snowflake
, which sets parameters for your Azure Key Vault and Snowflake Data Plane, andGCP + BigQuery
, which sets parameters for your GCP Secret Manager and BigQuery Data Plane. You will delete the parameters you do not need and then update the values of the parameters you will be using. You can see a sample configuration below:
- Azure Vault with Snowflake Data Plane
- Google Secret Manager with BigQuery Data Plane
profile:
parameters:
# Azure + Snowflake
azure_key_vault_name: env-prod-vault
snowflake_account: my_account
snowflake_database: ASCEND_ENV_PROD
snowflake_schema: quickstart
snowflake_user: ASCEND_ENV_PROD
snowflake_role: ASCEND_ENV_PROD
snowflake_warehouse: ASCEND_ENV_PROD
defaults:
- kind: Flow
name:
regex: .*
spec:
data_plane:
connection_name: my_data_plane
profile:
parameters:
gcp_project_id: my-project
bigquery_dataset: quickstart
defaults:
- kind: Flow
name:
regex: .*
spec:
data_plane:
connection_name: my_data_plane
- Click
Save
to save your changes.
Build and Run your Flow!β
It is now time to run your flow!
-
Click the
Build Project
button in the build panel on the bottom of the workspace page. This will compile your project, substituting the profile details into the flows. You should now see a visual representation of your flow, with the status of each component in the flow. -
Select on the
quickstart
flow in the build panel. Here you can see your built Flow DAG. To run the built flow, click the Play Button on the right hand side of the DAG. -
You should now see your Flow go into a running state. As components complete, you will see the record count pop up on each component. You can right-click on a component and click Records to see its records.
β¨Congratulations!β¨ You have just successfully run your first flow in Ascend. This is a great starting point for you to start building your own flows and use cases. Check out our β What's Next? section to continue building and learning!