예제 #1
0
 def test_load_from_url(self):
     tasks.load_from_url(self.dsn, self.cra_url)
     package = data_manager.package(self.dsn)
     sources = list(package.all(Source))
     assert len(sources) == 1, sources
     src0 = sources[0]
     assert src0.meta['name'] == 'cra.csv', src0.meta.items()
예제 #2
0
 def test_load_from_url(self):
     tasks.load_from_url(self.dsn, self.cra_url)
     package = data_manager.package(self.dsn)
     sources = list(package.all(Source))
     assert len(sources) == 1, sources
     src0 = sources[0]
     assert src0.meta['name'] == 'cra.csv', src0.meta.items()
예제 #3
0
def csvimport(**args):
    """ Load a CSV dataset """
    model = get_model(args['model'])
    dataset = get_or_create_dataset(model)
    load_from_url(dataset, args['data_url'])
예제 #4
0
def csvimport(**args):
    """ Load a CSV dataset """
    model = get_model(args['model'])
    dataset = get_or_create_dataset(model)
    load_from_url(dataset, args['data_url'])