def fromTable(table, paramName):
        """
        Converts a table to GPRecordSet object
        Inputs:
           table - path to the table
           paramName - name of the parameter
        """
        from ..common.spatial import recordset_to_json
        g = GPRecordSet()
        g.paramName = paramName
        g.value = json.loads(recordset_to_json(table))
        return g