Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sql lineage #1218

Merged
merged 52 commits into from
Jun 20, 2024
Merged

feat: sql lineage #1218

merged 52 commits into from
Jun 20, 2024

Conversation

AdiGajbhiye
Copy link
Collaborator

WIP

WIP

feat: added new sql lineage panel

WIP

WIP

WIP

WIP

WIP

feat: added sql lineage panel

Overview

Problem

Describe the problem you are solving. Mention the ticket/issue if applicable.

Solution

Describe the implemented solution. Add external references if needed.

Screenshot/Demo

A picture is worth a thousand words. Please highlight the changes if applicable.

How to test

  • Steps to be followed to verify the solution or code changes
  • Mention if there is any settings configuration added/changed/deleted

Checklist

  • I have run this code and it appears to resolve the stated issue
  • README.md updated and added information about my change

WIP

WIP

feat: added new sql lineage panel

WIP

WIP

WIP

WIP

WIP

feat: added sql lineage panel
new_lineage_panel/src/StaticLineage.tsx Fixed Show fixed Hide fixed
setTheme,
};

window.addEventListener("message", (event) => {

Check warning

Code scanning / CodeQL

Missing origin verification in `postMessage` handler Medium

Postmessage handler has no origin check.
new_lineage_panel/src/StaticLineage.tsx Fixed Show fixed Hide fixed
@@ -461,3 +583,47 @@ export const ColumnNode: FunctionComponent<NodeProps> = ({ data }) => {
</div>
);
};

const LIGHT_ICONS: Record<string, React.ReactNode> = {
Copy link
Collaborator

@saravmajestic saravmajestic Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each of these icons differ only by fill color. We can use currentColor property in fill and handle the colors using css with theme. This will avoid maintaining multiple svgs and these Light and dark icon objects

selfConnecting: SelfConnectingEdge,
};

type StaticLineageProps = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this called staticlineage?

details: Details;
};

const StaticLineage: FunctionComponent<StaticLineageProps> = ({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like repeated code from existing lineage. Is it possible to refactor to use same code?

@@ -473,6 +509,113 @@ const processColumnLineage = async (
return { nodes, edges, collectColumns, newCurr, confidence, seeMoreLineage };
};

export const staticProcessColumnLineage = async (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

possible to reuse parts of existing processColumnLineage code?

src/commands/index.ts Outdated Show resolved Hide resolved
private terminal: DBTTerminal,
) {
this.disposables.push(
dbtProjectContainer.onManifestChanged((event) =>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this and related code can be replaced by using queryManifestService

src/webview_provider/sqlLineagePanel.ts Outdated Show resolved Hide resolved
@@ -433,17 +426,23 @@ $size: 1.2em;
}
}

.code_editor_container {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are not needed anymore?

};

window.addEventListener("message", (event) => {
console.log("static-lineage:message -> ", event.data);

Check warning

Code scanning / CodeQL

Log injection Medium

Log entry depends on a
user-provided value
.
@anandgupta42
Copy link
Contributor

@saravmajestic, the review comments will be addressed in a different PR. Merging PR to enable beta testing.

@anandgupta42 anandgupta42 merged commit 1253c52 into master Jun 20, 2024
7 checks passed
@AdiGajbhiye AdiGajbhiye deleted the feat-sql-lineage branch June 25, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants