MINHAZ KAZI: Welcome to "DataVis DevTalk."
I'm your host, Minhaz Kazi, developer advocate
for Data Studio.
In this episode of "DataVis DevTalk,"
you will learn how to manage versions of your connector code
and how to use separate deployments for your connector.
Let's get started.
[MUSIC PLAYING]
As you develop code for your Community Connector,
you can test and use your connector in Data Studio
by deploying it from Apps Script.
Deployments let Data Studio execute the connector code
by Apps Script.
You can access and manage all deployments for your connector
by going to the Publish menu and selecting Deploy
From Manifest in the Apps Scripts environment.
After selecting this option, you'll
see the list of all available deployments for your connector.
For a new connector project, you'll
start with the head deployment.
This head deployment will always be associated
with the current or latest version of your code
that you're working with.
Click on any deployment to reveal the deployment link.
You or your users can use this link to directly access and use
your connector in Data Studio.
If you go to your deployment link,
it will open up your Data Studio with your connector selected.
If this is the first time you're using a connector,
Data Studio will ask for authorization
for that connector.
This is where you can start testing your connector.
The other way to test your connector
is to view the deployment list in Apps Script
and get the idea for deployment.
Next, open up Data Studio in a browser tab
and go to data sources.
Start adding a new data source and click on the developers
icon on top right.
This will give you an interface where
you can enter the connector ID, validate the deployment,
and then select the connector to start using it.
This method is helpful to evaluate how your connector
card might look like in the Data Studio connector gallery.
I mentioned earlier that the head deployment is always
associated with the latest version of your connector code.
Apps Script lets you save different versions or snapshots
of your code.
These snapshots are numbered sequentially,
and you can add your own notes to each version
as you make the changes.
Let's say you're developing a connector
and you want a few colleagues to try it out.
However, at the same time, you want
to keep working on the code.
So you save a new version of your code,
we'll call it Test Candidate 1, and create a new deployment
based on this version.
We'll call this deployment Test.
This test deployment will have a different deployment ID
and deployment URL compared to your head deployment.
After your colleagues try out your connector,
they give you some feedback and you update your code.
This new version of the code is now called Test Candidate 2.
Now, you want to integrate these changes
into the test deployment so your colleagues can
view the changes.
You don't have to create a new deployment here.
You can just edit the existing test deployment
and select the new version of the code to use.
Having multiple deployments and the ability
to update the version of the code associated
with each deployment helps you to have
a streamlined deployment process.
We strongly recommend that you use the head deployment
only during code development.
Use separate test and production deployments
for testing and distribution of your connector.
There are a few things to keep in mind for deployments.
First, connectors in Data Studio are associated
with unique deployment links.
So if you create two deployments from your connector code
and add them to Data Studio, they
will appear as two separate connectors.
Second, you can edit and update the name
for the deployment and the version of the code associated
with the connector.
But you cannot edit a deployment ID or link.
And third, if you delete a deployment from Apps Script,
it cannot be recovered.
Let's say your users are using a specific deployment
and have created dashboards from it.
If you delete the deployment from Apps Script,
the connector and the associated dashboards will stop working.
To learn more about deployments and versions,
check out the links in the description below.
And don't forget to subscribe to the GCP channel
for more great content on Data Studio.
Thanks for watching.
And until next time, keep building awesome dashboards.
[MUSIC PLAYING]