class sqllineage.core.metadata_provider.MetaDataProvider[source]

Base class used to provide metadata like table schema.

When parse below sql:

INSERT INTO db1.table1
FROM db2.table2 t2
JOIN db3.table3 t3 ON =

Only by literal analysis, we don’t know which table is selected column c1 from. A subclass of MetaDataProvider implementing _get_table_columns passing to sqllineage.runner.LineageRunner. can help parse column lineage correctly.

get_table_columns(table: Table, **kwargs) List[Column][source]

return columns of given table.

register_session_metadata(table: Table, columns: List[Column]) None[source]

Register session-level metadata, like temporary table or view created.

deregister_session_metadata() None[source]

Deregister session-level metadata.