amoghrajesh commented on code in PR #36015: URL: https://github.com/apache/airflow/pull/36015#discussion_r1414834022
########## airflow/providers/common/sql/doc/adr/0002-return-common-data-structure-from-dbapihook-derived-hooks.md: ########## @@ -0,0 +1,139 @@ +<!-- + 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. + --> + +# 2. Return common data structure from DBApiHook derived hooks Review Comment: This should be point number 1 instead? ########## airflow/providers/common/sql/doc/adr/0002-return-common-data-structure-from-dbapihook-derived-hooks.md: ########## @@ -0,0 +1,139 @@ +<!-- + 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. + --> + +# 2. Return common data structure from DBApiHook derived hooks + +Date: 2023-12-01 + +## Status + +Accepted + +## Context + +Note: This ADR describes the decision made (but not recorded) when common.sql provider has been +introduced in July 2022, but this ADR is recorded in December 2023 to make sure the decision is +recorded. + +Before common.sql provider, we had a number of DBApi-derived Hooks which interfaced with Python +DBAPI-compliant database and the format of data returned from these hooks were different and +dependent on the implementation of the DBAPI interface as well as implementation of the Hooks and operators. +We also had a lot of very similar operators that performed similar tasks - like Querying, Sensing the +database, column check etc. This led to a lot of code duplication, and we decided that we need a common set +of operators that can be used across all the DBAPI-compliant databases. + +Unfortunately there is no common standard for data returned by Python DBAPI interface. It's partially Review Comment: Nit: DBApi ########## airflow/providers/common/sql/doc/adr/0002-return-common-data-structure-from-dbapihook-derived-hooks.md: ########## @@ -0,0 +1,139 @@ +<!-- + 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. + --> + +# 2. Return common data structure from DBApiHook derived hooks + +Date: 2023-12-01 + +## Status + +Accepted + +## Context + +Note: This ADR describes the decision made (but not recorded) when common.sql provider has been +introduced in July 2022, but this ADR is recorded in December 2023 to make sure the decision is +recorded. + +Before common.sql provider, we had a number of DBApi-derived Hooks which interfaced with Python +DBAPI-compliant database and the format of data returned from these hooks were different and +dependent on the implementation of the DBAPI interface as well as implementation of the Hooks and operators. Review Comment: nit: DBApi ########## airflow/providers/common/sql/doc/adr/0002-return-common-data-structure-from-dbapihook-derived-hooks.md: ########## @@ -0,0 +1,139 @@ +<!-- + 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. + --> + +# 2. Return common data structure from DBApiHook derived hooks + +Date: 2023-12-01 + +## Status + +Accepted + +## Context + +Note: This ADR describes the decision made (but not recorded) when common.sql provider has been +introduced in July 2022, but this ADR is recorded in December 2023 to make sure the decision is +recorded. + +Before common.sql provider, we had a number of DBApi-derived Hooks which interfaced with Python +DBAPI-compliant database and the format of data returned from these hooks were different and +dependent on the implementation of the DBAPI interface as well as implementation of the Hooks and operators. +We also had a lot of very similar operators that performed similar tasks - like Querying, Sensing the +database, column check etc. This led to a lot of code duplication, and we decided that we need a common set +of operators that can be used across all the DBAPI-compliant databases. Review Comment: Nit: DBApi ########## airflow/providers/common/sql/doc/adr/0002-return-common-data-structure-from-dbapihook-derived-hooks.md: ########## @@ -0,0 +1,139 @@ +<!-- + 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. + --> + +# 2. Return common data structure from DBApiHook derived hooks + +Date: 2023-12-01 + +## Status + +Accepted + +## Context + +Note: This ADR describes the decision made (but not recorded) when common.sql provider has been +introduced in July 2022, but this ADR is recorded in December 2023 to make sure the decision is +recorded. + +Before common.sql provider, we had a number of DBApi-derived Hooks which interfaced with Python +DBAPI-compliant database and the format of data returned from these hooks were different and Review Comment: Nit: DBApi -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
