diff --git a/src/Che/DBAL/Vertica/VerticaDriver.php b/src/Che/DBAL/Vertica/VerticaDriver.php index 24e7902..07faa91 100644 --- a/src/Che/DBAL/Vertica/VerticaDriver.php +++ b/src/Che/DBAL/Vertica/VerticaDriver.php @@ -113,10 +113,16 @@ function ($val) { } ); - $dsn .= sprintf( - "ConnSettings=%s;", - str_replace([';', ' '], ['%3B', '+'], implode('%3B', $connectionSettings)) - ); + if (!empty($connectionSettings)) { + $dsn .= sprintf( + "ConnSettings=%s;", + str_replace([';', ' '], ['%3B', '+'], implode('%3B', $connectionSettings)) + ); + } + + if (isset($driverOptions['label'])) { + $dsn .= 'Label=' . $driverOptions['label']; + } } return $dsn;