function getColumns($table,$prefix)
{
$resource = $GLOBALS['obj']->get('MagentoFrameworkAppResourceConnection');
$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;
}