MCPcopy Create free account
hub / github.com/brimdata/super / load

Method load

python/superdb/superdb.py:47–55  ·  view source on GitHub ↗
(self, pool_name_or_id, data, branch_name='main',
             commit_author=getpass.getuser(), commit_body='')

Source from the content-addressed store, hash-verified

45 self.__raise_for_status(r)
46
47 def load(self, pool_name_or_id, data, branch_name='main',
48 commit_author=getpass.getuser(), commit_body=''):
49 pool = urllib.parse.quote(pool_name_or_id, safe='')
50 branch = urllib.parse.quote(branch_name, safe='')
51 url = self.base_url + '/pool/' + pool + '/branch/' + branch
52 commit_message = {'author': commit_author, 'body': commit_body}
53 headers = {'SuperDB-Commit': json.dumps(commit_message)}
54 r = self.session.post(url, headers=headers, data=data)
55 self.__raise_for_status(r)
56
57 def query(self, query):
58 r = self.query_raw(query)

Callers

nothing calls this directly

Calls 2

__raise_for_statusMethod · 0.95
postMethod · 0.80

Tested by

no test coverage detected