Magento2 Juntar mesa com prefixo

function getColumns($table,$prefix)
{
    $resource = $GLOBALS['obj']->get('Magento\Framework\App\ResourceConnection');
    $connection = $resource->getConnection();
    $sql = "SHOW COLUMNS FROM `$table`;";
    echo $sql;
    $result = $connection->fetchAll($sql);
    $columns = array();
    for ($i = 0; $i < count($result); $i++) {
        array_push($columns,$result[$i]['Field']." as ".$prefix.$result[$i]['Field']);
    }
    return $columns;
}
Dharmesh Tukadiya