tfx.v1.components.ImportSchemaGen

A TFX ImportSchemaGen component to import a schema file into the pipeline.

Inherits From: BaseComponent, BaseNode

ImportSchemaGen is a specialized SchemaGen which imports a pre-defined schema file into the pipeline.

In a typical TFX pipeline, users are expected to review the schemas generated with SchemaGen and store them in SCM or equivalent. Those schema files can be brought back to pipelines using ImportSchemaGen.

Here is an example to use the ImportSchemaGen:

schema_gen = ImportSchemaGen(schema_file=schema_path)

Component outputs contains:

See the SchemaGen guide for more details.

ImportSchemaGen works almost similar to Importer except following:

  • schema_file should be the full file path instead of directory holding it.
  • schema_file is copied to the output artifact. This is different from Importer that loads an "Artifact" by setting its URI to the given path.

schema_file File path to the input schema file. This file will be copied to the output artifact which is generated inside the pipeline root directory.

outputs Component's output channel dict.

Methods

with_node_execution_options

POST_EXECUTABLE_SPEC None
PRE_EXECUTABLE_SPEC None