Connecting and executing SQL statements
Print
- Last Updated: May 13, 2025
- 2 minute read
- DataDirect Connectors
- JDBC
- HubSpot 6.0
- Documentation
To use the driver to access data with DbVisualizer:
- Open DbVisualizer.
- From the menu, select Database>New Connection. When prompted to use the Connection Wizard, click OK.
-
Provide the following information when
prompted; then, click Next to
proceed:
- Connection alias: Type the name to be used when referring to this connection.
- Driver: Select the alias that you provided for your driver from the drop-down menu.
-
Provide values for the following fields;
then, click Finish.
- Database URL: Copy and paste your connection URL
into this field. The following examples show how to connect using OAuth
2.0 access token, OAuth 2.0 refresh token, or API key authentication.
OAuth 2.0 access token
jdbc:datadirect:hubspot:AuthenticationMethod=OAuth2; AccessToken=abcDEF123ghi-456Jklmno789-Pqrst01234;OAuth 2.0 refresh token
jdbc:datadirect:hubspot:AuthenticationMethod=oauth2; ClientID=ab123c45-def6-7g89-gh1i-m2345no67891; ClientSecret=12a3=bCD/EfGh4Ijk+Lm5P67qR8s=//TuV+WXy1Zabcd; RefreshToken=12a3=bCD/EfGh4Ijk+Lgd8g-44tk3c527831;Note: See OAuth 2.0 authentication for details.API key
jdbc:datadirect:hubspot:AuthenticationMethod=URLParameter; APIKey=1234ab5cd-1a2b-3a4b-678uvw-xyz91011;Note: See API key authentication for details.
- Database URL: Copy and paste your connection URL
into this field. The following examples show how to connect using OAuth
2.0 access token, OAuth 2.0 refresh token, or API key authentication.
- To execute SQL statements, select SQL Commander>New SQL Commander. A SQL Commander tab opens.
-
Select values for the following
fields:
- Database Connection: Select connection alias you provided for the connection from the drop-down menu.
- Schema: Select the schema you want to execute queries against from the drop-down menu.
-
In the SQL Commander tab, enter SQL
commands you want to execute; then select SQL
Commander>Execute. For example:
To select all of the rows from the
BLOGStable:
To select the details of a specified company:SELECT * BLOGSSELECT * FROM COMPANY WHERE COMPANYID = <company_id>See "Supported SQL statements and extensions" for the supported syntax used to execute SQL statements.
Note: If you are fetching large sets of data, you may want to limit the results using the Max Rows and Max Chars fields.