def push_datapackage(descriptor, backend, **backend_options):
<EOL>warnings.warn(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>UserWarning)<EOL>tables = []<EOL>schemas = []<EOL>datamap = {}<EOL>mapping = {}<EOL>model = Package(descriptor)<EOL>plugin = import_module('<STR_LIT>' % backend)<EOL>storage = plugin.Storage(**backend_options)<EOL>for resource in model.resources:<EOL><INDENT>if not resource.tabular:<EOL><INDENT>continue<EOL><DEDENT>name = resource.descriptor.get('<STR_LIT:name>', None)<EOL>table = _convert_path(resource.descriptor['<STR_LIT:path>'], name)<EOL>schema = resource.descriptor['<STR_LIT>']<EOL>data = resource.table.iter(keyed=True)<EOL>def values(schema, data):<EOL><INDENT>for item in data:<EOL><INDENT>row = []<EOL>for field in schema['<STR_LIT>']:<EOL><INDENT>row.append(item.get(field['<STR_LIT:name>'], None))<EOL><DEDENT>yield tuple(row)<EOL><DEDENT><DEDENT>tables.append(table)<EOL>schemas.append(schema)<EOL>datamap[table] = values(schema, data)<EOL>if name is not None:<EOL><INDENT>mapping[name] = table<EOL><DEDENT><DEDENT>schemas = _convert_schemas(mapping, schemas)<EOL>for table in tables:<EOL><INDENT>if table in storage.buckets:<EOL><INDENT>storage.delete(table)<EOL><DEDENT><DEDENT>storage.create(tables, schemas)<EOL>for table in storage.buckets:<EOL><INDENT>if table in datamap:<EOL><INDENT>storage.write(table, datamap[table])<EOL><DEDENT><DEDENT>return storage<EOL>
Push Data Package to storage.

    All parameters should be used as keyword arguments.

    Args:
        descriptor (str): path to descriptor
        backend (str): backend name like `sql` or `bigquery`
        backend_options (dict): backend options mentioned in backend docs