You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "JDarDagran (via GitHub)" <gi...@apache.org> on 2023/11/22 11:49:32 UTC

[PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

JDarDagran opened a new pull request, #35794:
URL: https://github.com/apache/airflow/pull/35794

   Add flat information schema query support in SQLParser.
   
   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   
   This PR adds support for Redshift SQL.
   
   Additional changes in OpenLineage SQL utils were neccessary. This is because Redshift has capability to make cross-database queries, however, traditional cross-database queries to `information_schema.columns` does not work. Instead one should read from `SVV_REDSHIFT_COLUMNS` which is a single table containing multi-database information.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "JDarDagran (via GitHub)" <gi...@apache.org>.
JDarDagran commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1433215003


##########
airflow/providers/openlineage/sqlparser.py:
##########
@@ -299,7 +304,8 @@ def create_information_schema_query(
         is_cross_db: bool,
         information_schema_columns,
         information_schema_table,

Review Comment:
   I've added some more type hints. It's Airflow Connection, the one that keeps information how to connect to various services.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "JDarDagran (via GitHub)" <gi...@apache.org>.
JDarDagran commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1439035387


##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:

Review Comment:
   It's still a bit subjective if I think so but probably I'm too meticulous 😄  Thanks for reminding though!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "JDarDagran (via GitHub)" <gi...@apache.org>.
JDarDagran commented on PR #35794:
URL: https://github.com/apache/airflow/pull/35794#issuecomment-1864483777

   Pinging @o-nikolas then :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "JDarDagran (via GitHub)" <gi...@apache.org>.
JDarDagran commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1402679860


##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:

Review Comment:
   Do you mean it's missing type hint?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1439034813


##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:

Review Comment:
   @JDarDagran -> see https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#step-5-pass-pr-review - you do not have to "wait" to resolve the conversation if you **believe** it is resolved. If you think it is and you addressed it, as author of the PR you can also resolve it yourself. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "JDarDagran (via GitHub)" <gi...@apache.org>.
JDarDagran commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1402686751


##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:
+        """Returns Redshift specific information for OpenLineage."""
+        from airflow.providers.openlineage.sqlparser import DatabaseInfo
+
+        authority = self._get_openlineage_redshift_authority_part(connection)
+
+        return DatabaseInfo(
+            scheme="redshift",
+            authority=authority,
+            database=connection.schema,
+            information_schema_table_name="SVV_REDSHIFT_COLUMNS",
+            information_schema_columns=[
+                "schema_name",
+                "table_name",
+                "column_name",
+                "ordinal_position",
+                "data_type",
+                "database_name",
+            ],
+            is_information_schema_cross_db=True,
+            use_flat_cross_db_query=True,
+        )
+
+    def _get_openlineage_redshift_authority_part(self, connection) -> str:
+        from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
+
+        port = connection.port or 5439
+
+        cluster_identifier = None
+
+        if connection.extra_dejson.get("iam", False):
+            cluster_identifier = connection.extra_dejson.get("cluster_identifier")
+            region_name = AwsBaseHook(aws_conn_id=self.aws_conn_id).region_name

Review Comment:
   It's not very well documented `redshift-connector` what's the precedence.
   Now I think these are the cases:
   
   1. IAM = True:
       a. `cluster_identifier` from `connect` argument, rest from default AWS profile.
       b. `cluster_identifier` but also `access_key_id`, `secret_access_key`,`session_token`, `region` from `connect` aguments
       c. `cluster_identifier` from `connect` argument but without credentials passed explicitly, not sure if `region` has precedence over value from AWS default profile
   2. IAM = False: attempt to retrieve region name from hostname
   
   For 1.c. I think `get_iam_token` does not include `region` as argument so it default to AWS default profiles` value.
   
   Feedback from anyone closer to this connector implementation would be really helpful :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "JDarDagran (via GitHub)" <gi...@apache.org>.
JDarDagran commented on PR #35794:
URL: https://github.com/apache/airflow/pull/35794#issuecomment-1867423828

   @ferruzzi it **seems** we're ready to go?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "JDarDagran (via GitHub)" <gi...@apache.org>.
JDarDagran commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1439023100


##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:

Review Comment:
   @o-nikolas  since now there's a requirement to solve all conversations can we solve this one?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "JDarDagran (via GitHub)" <gi...@apache.org>.
JDarDagran commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1402687254


##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:
+        """Returns Redshift specific information for OpenLineage."""
+        from airflow.providers.openlineage.sqlparser import DatabaseInfo
+
+        authority = self._get_openlineage_redshift_authority_part(connection)

Review Comment:
   It's `part` as it's an authority part required for constructing namespace in OpenLineage events.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on PR #35794:
URL: https://github.com/apache/airflow/pull/35794#issuecomment-1863486361

   Still waiting to resolve the conversation with Niko but other than that discussion, the rest LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "o-nikolas (via GitHub)" <gi...@apache.org>.
o-nikolas commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1433087081


##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:
+        """Returns Redshift specific information for OpenLineage."""
+        from airflow.providers.openlineage.sqlparser import DatabaseInfo
+
+        authority = self._get_openlineage_redshift_authority_part(connection)
+
+        return DatabaseInfo(
+            scheme="redshift",
+            authority=authority,
+            database=connection.schema,
+            information_schema_table_name="SVV_REDSHIFT_COLUMNS",
+            information_schema_columns=[
+                "schema_name",
+                "table_name",
+                "column_name",
+                "ordinal_position",
+                "data_type",
+                "database_name",
+            ],
+            is_information_schema_cross_db=True,
+            use_flat_cross_db_query=True,
+        )
+
+    def _get_openlineage_redshift_authority_part(self, connection) -> str:
+        from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
+
+        port = connection.port or 5439
+
+        cluster_identifier = None
+
+        if connection.extra_dejson.get("iam", False):
+            cluster_identifier = connection.extra_dejson.get("cluster_identifier")
+            region_name = AwsBaseHook(aws_conn_id=self.aws_conn_id).region_name

Review Comment:
   Okay, if we're sure that thing doesn't have any region specified then my concern is invalid :+1: 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "JDarDagran (via GitHub)" <gi...@apache.org>.
JDarDagran commented on PR #35794:
URL: https://github.com/apache/airflow/pull/35794#issuecomment-1876924843

   @ferruzzi @o-nikolas the PR is hanging for quite a long time. Is there anything in particular that would need explanation or any action?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "o-nikolas (via GitHub)" <gi...@apache.org>.
o-nikolas commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1402643538


##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:
+        """Returns Redshift specific information for OpenLineage."""
+        from airflow.providers.openlineage.sqlparser import DatabaseInfo
+
+        authority = self._get_openlineage_redshift_authority_part(connection)
+
+        return DatabaseInfo(
+            scheme="redshift",
+            authority=authority,
+            database=connection.schema,
+            information_schema_table_name="SVV_REDSHIFT_COLUMNS",
+            information_schema_columns=[
+                "schema_name",
+                "table_name",
+                "column_name",
+                "ordinal_position",
+                "data_type",
+                "database_name",
+            ],
+            is_information_schema_cross_db=True,
+            use_flat_cross_db_query=True,
+        )
+
+    def _get_openlineage_redshift_authority_part(self, connection) -> str:
+        from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
+
+        port = connection.port or 5439
+
+        cluster_identifier = None
+
+        if connection.extra_dejson.get("iam", False):
+            cluster_identifier = connection.extra_dejson.get("cluster_identifier")
+            region_name = AwsBaseHook(aws_conn_id=self.aws_conn_id).region_name

Review Comment:
   I'm not entirely sure what type of connection this is, but does it include a region? If so, shouldn't you try to get the region from `connection` first before falling back to the aws conn id?



##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:

Review Comment:
   What is the type of `connection`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "o-nikolas (via GitHub)" <gi...@apache.org>.
o-nikolas commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1433085459


##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:

Review Comment:
   Missing a type hint, and also (maybe because of that) it was a genuine curiosity because I have no idea what type of connection that is or what it contains.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1402660284


##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:
+        """Returns Redshift specific information for OpenLineage."""
+        from airflow.providers.openlineage.sqlparser import DatabaseInfo
+
+        authority = self._get_openlineage_redshift_authority_part(connection)

Review Comment:
   Should this be "port" or "part"?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "o-nikolas (via GitHub)" <gi...@apache.org>.
o-nikolas merged PR #35794:
URL: https://github.com/apache/airflow/pull/35794


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "JDarDagran (via GitHub)" <gi...@apache.org>.
JDarDagran commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1402686751


##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:
+        """Returns Redshift specific information for OpenLineage."""
+        from airflow.providers.openlineage.sqlparser import DatabaseInfo
+
+        authority = self._get_openlineage_redshift_authority_part(connection)
+
+        return DatabaseInfo(
+            scheme="redshift",
+            authority=authority,
+            database=connection.schema,
+            information_schema_table_name="SVV_REDSHIFT_COLUMNS",
+            information_schema_columns=[
+                "schema_name",
+                "table_name",
+                "column_name",
+                "ordinal_position",
+                "data_type",
+                "database_name",
+            ],
+            is_information_schema_cross_db=True,
+            use_flat_cross_db_query=True,
+        )
+
+    def _get_openlineage_redshift_authority_part(self, connection) -> str:
+        from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
+
+        port = connection.port or 5439
+
+        cluster_identifier = None
+
+        if connection.extra_dejson.get("iam", False):
+            cluster_identifier = connection.extra_dejson.get("cluster_identifier")
+            region_name = AwsBaseHook(aws_conn_id=self.aws_conn_id).region_name

Review Comment:
   It's not very well documented  in`redshift-connector` what's the precedence.
   Now I think these are the cases:
   
   1. IAM = True:
       a. `cluster_identifier` from `connect` argument, rest from default AWS profile.
       b. `cluster_identifier` but also `access_key_id`, `secret_access_key`,`session_token`, `region` from `connect` aguments
       c. `cluster_identifier` from `connect` argument but without credentials passed explicitly, not sure if `region` has precedence over value from AWS default profile
   2. IAM = False: attempt to retrieve region name from hostname
   
   For 1.c. I think `get_iam_token` does not include `region` as argument so it default to AWS default profiles` value.
   
   Feedback from anyone closer to this connector implementation would be really helpful :)
   
   I was looking at https://github.com/aws/amazon-redshift-python-driver/blob/master/README.rst



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on PR #35794:
URL: https://github.com/apache/airflow/pull/35794#issuecomment-1823078460

   @ferruzzi, you might be interested into this one :) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "ferruzzi (via GitHub)" <gi...@apache.org>.
ferruzzi commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1419751811


##########
airflow/providers/openlineage/sqlparser.py:
##########
@@ -299,7 +304,8 @@ def create_information_schema_query(
         is_cross_db: bool,
         information_schema_columns,
         information_schema_table,

Review Comment:
   Any chance you could add these two type hints as well while you are in there?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "JDarDagran (via GitHub)" <gi...@apache.org>.
JDarDagran commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1422373360


##########
airflow/providers/openlineage/sqlparser.py:
##########
@@ -299,7 +304,8 @@ def create_information_schema_query(
         is_cross_db: bool,
         information_schema_columns,
         information_schema_table,

Review Comment:
   Added. Not sure why I skipped these.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "o-nikolas (via GitHub)" <gi...@apache.org>.
o-nikolas commented on PR #35794:
URL: https://github.com/apache/airflow/pull/35794#issuecomment-1877521008

   > @ferruzzi @o-nikolas the PR is hanging for quite a long time. Is there anything in particular that would need explanation or any action?
   
   Dennis gave a LGTM in a previous comment, so I approved and merged with two approvals :) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] openlineage, aws: add OpenLineage support for Redshift SQL. [airflow]

Posted by "JDarDagran (via GitHub)" <gi...@apache.org>.
JDarDagran commented on code in PR #35794:
URL: https://github.com/apache/airflow/pull/35794#discussion_r1433244403


##########
airflow/providers/amazon/aws/hooks/redshift_sql.py:
##########
@@ -174,3 +175,63 @@ def get_conn(self) -> RedshiftConnection:
         conn_kwargs_dejson = self.conn.extra_dejson
         conn_kwargs: dict = {**conn_params, **conn_kwargs_dejson}
         return redshift_connector.connect(**conn_kwargs)
+
+    def get_openlineage_database_info(self, connection) -> DatabaseInfo:

Review Comment:
   I've added some more type hints. It's Airflow Connection, the one that keeps information how to connect to various services.



##########
airflow/providers/openlineage/sqlparser.py:
##########
@@ -299,7 +304,8 @@ def create_information_schema_query(
         is_cross_db: bool,
         information_schema_columns,
         information_schema_table,

Review Comment:
   I've added some more type hints. It's Airflow Connection, the one that keeps information how to connect to various services.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org