Splitgraph has been acquired by EDB! Read the blog post.

splitgraph.splitfile package

Submodules

splitgraph.splitfile.execution module

Functions for executing Splitfiles.

splitgraph.splitfile.execution.checkout_if_changed(repository: splitgraph.core.repository.Repository, image_hash: str) None
splitgraph.splitfile.execution.execute_commands(commands: str, params: Optional[Dict[str, str]] = None, output: Optional[splitgraph.core.repository.Repository] = None, output_base: str = '00000000000000000000000000000000') None

Executes a series of Splitfile commands.

Parameters
  • commands – A string with the raw Splitfile.

  • params – A dictionary of parameters to be applied to the Splitfile (${PARAM} is replaced with the specified parameter value).

  • output – Output repository to execute the Splitfile against.

  • output_base – If not None, a revision that gets checked out for all Splitfile actions to be committed on top of it.

splitgraph.splitfile.execution.getrandbits(k) x.  Generates an int with k random bits.
splitgraph.splitfile.execution.prevalidate_imports(table_names: List[str], table_queries: List[bool]) List[str]
splitgraph.splitfile.execution.rebuild_image(image: splitgraph.core.image.Image, source_replacement: Dict[splitgraph.core.repository.Repository, str]) None

Recreates the Splitfile used to create a given image and reruns it, replacing its dependencies with a different set of versions.

Parameters
  • image – Image object

  • source_replacement – A map that specifies replacement images/tags for repositories that the image depends on

Module contents

Splitfile interpreter: a set of tools on top of the core Splitgraph versioning and image management to give the user a Dockerfile-like experience for building Splitgraph images (caching, consistent hashing, a declarative language).