PostgreSQL via CloudSQL Proxy
This is a general procedure of creating a PostgreSQL via CloudSQL Proxy database connection. Follow these instructions to use the interface of the New connection dialog for this particular database type.
Use the General tab of the New PostgreSQL via CloudSQL Proxy connection dialog to set up the parameters that are specific for this database type.
Configure a PostgreSQL via CloudSQL Proxy connection
Open the New PostgreSQL via CloudSQL Proxy connection dialog. Select the tab for one of the two options:
From the editor, to attach the new database to a specific notebook
From the Home page, to add a database connection to a workspace
Go to Attached data icon on the left-hand sidebar.
or click theClick New connection and select New database connection.
In the New database connection dialog, select PostgreSQL via CloudSQL Proxy.
On the Home page, select the workspace where you want to create the connection.
Select Databases from the menu under the workspace name.
Click the Add connection button in the upper right corner. The New database connection dialog will open.
In the New database connection dialog, select PostgreSQL via CloudSQL Proxy.
On the General tab, select the connection type.
default: to connect by specifying the Host, Port, and Database.
URL only: to connect by providing the URL of a pre-built connection.
Proceed based on the selected connection type:
In the Project field, type your project name.
In the Instance field, provide the instance name.
Under Authentication, select an authentication method:
User & Password: to use your login and password
No auth: to connect without authentication required
In the User and Password fields, specify your credentials if required by the selected authentication method.
In the Database field, type the database name to which you want to connect.
In the Region, type the instance region.
Under Authentication, select an authentication method:
User & Password: to use your login and password
No auth: to connect without authentication required
In the User and Password fields, specify your credentials if required by the selected authentication method.
In the URL field, provide the URL of the pre-built connection you want to establish.
Click the Test connection button at the bottom of the dialog.
Once the connection is successfully tested, click the Save and close button.
Results
If created for a specific notebook, the new connection will be automatically added to the workspace. You can later attach this database to any other notebook from this workspace.
If created for a workspace, this connection is added to the workspace databases and can be attached to any noteboook from this workspace.