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

spark,snowflake: support query option via SQL parser #2563

Merged
merged 1 commit into from Apr 3, 2024

Conversation

mobuchowski
Copy link
Member

@mobuchowski mobuchowski commented Apr 3, 2024

This is similar (and based on) to #2556 but concerns Snowflake queries.

When Snowflake job is bypassing Spark's computation layer, use SQL parser to get the lineage.

Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
Copy link
Contributor

@pawel-big-lebowski pawel-big-lebowski left a comment

Choose a reason for hiding this comment

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

This is nice. Few minor comments added.

@@ -35,20 +42,15 @@ public static <D extends OpenLineage.Dataset> D getDataset(
// An improvement could be put the query string in the `DatasetFacets`
if (dbtable.isPresent()) {
tableName = dbtable.get();
String name = String.format("%s.%s.%s", sfDatabase, sfSchema, tableName);
Copy link
Contributor

Choose a reason for hiding this comment

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

would it make sense to add method in io.openlineage.client.utils.JdbcUtils instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

JDBCUtils deal with parsing JDBC URIs - this is not related to those I believe and is Snowflake specific.

@mobuchowski mobuchowski merged commit afcf225 into main Apr 3, 2024
32 checks passed
@mobuchowski mobuchowski deleted the spark/snowflake-complex branch April 3, 2024 17:55
blacklight pushed a commit to blacklight/OpenLineage that referenced this pull request Apr 4, 2024
Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
Signed-off-by: Fabio Manganiello <fabio@manganiello.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants