File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 1717LINEAGE_TABLE_NAME = "~lineage"
1818
1919
20- def _lineage_table_sql (database ):
21- """Generate SQL to create the ~lineage table."""
22- return f"""
20+ def ensure_lineage_table (connection , database ):
21+ """Create the ~lineage table if it doesn't exist."""
22+ connection .query (
23+ f"""
2324 CREATE TABLE IF NOT EXISTS `{ database } `.`{ LINEAGE_TABLE_NAME } ` (
2425 table_name VARCHAR(64) NOT NULL,
2526 attribute_name VARCHAR(64) NOT NULL,
2627 lineage VARCHAR(255) NOT NULL,
2728 PRIMARY KEY (table_name, attribute_name)
2829 ) ENGINE=InnoDB
29- """
30-
31-
32- def ensure_lineage_table (connection , database ):
33- """Create the ~lineage table if it doesn't exist."""
34- connection .query (_lineage_table_sql (database ))
30+ """
31+ )
3532
3633
3734def lineage_table_exists (connection , database ):
You can’t perform that action at this time.
0 commit comments