Enable PDC on vertica-datasource-connector

I am working on enabling PDC on vertica-grafana-datasource and using vertica-sql-go driver to connect with Vertica DB.

I have faced a challenge to implement PDC with Vertica and unable to pass dialectContext to the Vertica connection because Vertica Go driver used default net.Dial and unable to pass dialectContext of PDC to Vertica connection. Please help us to resolve this issue and is there any other way to use PDC with Vertica?

I have followed PDC integration guide to integrate PDC on Vertica.

  1. I have used On Premise Grafana server latest version.
  2. Able to configure frontend with enable & disable PDC.
  3. I have configured data source with dialer as per above document but Vertica Sql go driver just expose sql.Open(connStr) method and unable to set dialer context to new connection. Another function sql.OpenDB(connector) is not supported by current vertica go driver due to which unable to set dialContext to the connector. Using vertica go driver version 1.3.3(“GitHub - vertica/vertica-sql-go: Official native Go client for the Vertica Analytics Database.”) . Below are the Vertica data source code for your reference and commentes codes are not supported by Vertica sql go driver:

// register the secure socks proxy dialer context, if enabled

    if proxyClient.SecureSocksProxyEnabled() {

        pdialer, err := proxyClient.NewSecureSocksProxyContextDialer()

        if err != nil {

            return nil, err

        }

    connector.Dialer = &dialContextWrapper{DialContext: pdialer.DialContext}

    db, err := sql.Open("vertica", connStr)

    if err != nil {

        return nil, fmt.Errorf("failed to open Vertica connection: %w", err)

    }



    /\* Unsupported by vertica go

    connector, err := vertica.NewConnector(connStr) // assumes Vertica driver supports connectors

    if err != nil {

        return nil, fmt.Errorf("failed to create connector: %w", err)

    }

    db = sql.OpenDB(connector)

    \*/

}