def _getResourceMetadata(self, resourceId): resource = Resource(resourceId) resource.init() mapping = Mapping(resourceId) headers = mapping.get_mapping_headers() headers = self._concatHeaders(headers) tf = TabularFile(resourceId) csvDataframe = tf.get_csv_data() refine = Refine(resourceId) table = refine.structure_by_cols(csvDataframe) table = self._concatTable(table) package = Package(resource.package_name) return (resource, package, headers, table)
def _getOriginalHeader(self, resourceId): refine = Refine(resourceId) return refine.get_csv_table()['header']