Skip to content

Commit

Permalink
hotfix: column lineage bug (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
y-bruin authored Feb 3, 2025
1 parent e1f6c19 commit fa42e75
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/pipeline/lineage.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,16 @@ func (p *LineageExtractor) processLineageColumns(foundPipeline *Pipeline, asset
continue
}

tableSpec := strings.Split(upstream.Table, ".")

upstreamAsset := foundPipeline.GetAssetByName(tableSpec[len(tableSpec)-1])
if upstreamAsset == nil && upstream.Table != "" {
upstreamAsset := foundPipeline.GetAssetByName(upstream.Table)
if upstreamAsset == nil {
if err := p.addColumnToAsset(asset, lineageCol.Name, nil, &Column{
Name: upstream.Column,
Type: lineageCol.Type,
Checks: []ColumnCheck{},
Upstreams: []*UpstreamColumn{
{
Column: upstream.Column,
Table: strings.ToLower(tableSpec[len(tableSpec)-1]),
Table: strings.ToLower(upstream.Table),
},
},
}); err != nil {
Expand Down

0 comments on commit fa42e75

Please sign in to comment.