You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vatsrahul1001 (via GitHub)" <gi...@apache.org> on 2024/08/23 14:37:21 UTC
[PR] Update Databricks workflow example DAG [airflow]
vatsrahul1001 opened a new pull request, #41700:
URL: https://github.com/apache/airflow/pull/41700
Update Databricks workflow example DAG
<!--
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/
-->
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
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] Update Databricks workflow example DAG [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #41700:
URL: https://github.com/apache/airflow/pull/41700#discussion_r1729203012
##########
tests/system/providers/databricks/example_databricks_workflow.py:
##########
@@ -32,34 +32,53 @@
EXECUTION_TIMEOUT = int(os.getenv("EXECUTION_TIMEOUT", 6))
-DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_conn")
+DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_default")
DATABRICKS_NOTIFICATION_EMAIL = os.getenv("DATABRICKS_NOTIFICATION_EMAIL", "your_email@serviceprovider.com")
GROUP_ID = os.getenv("DATABRICKS_GROUP_ID", "1234").replace(".", "_")
USER = os.environ.get("USER")
-QUERY_ID = os.environ.get("QUERY_ID", "c9cf6468-babe-41a6-abc3-10ac358c71ee")
-WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "cf414a2206dfb397")
+QUERY_ID = os.environ.get("QUERY_ID", "d3773b5a-56f9-422c-ae60-048eaa90aa33")
+WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "368fe30b92228713")
+
+
+## We can use below specs for AWS databricks
+# "job_cluster_key": "Shared_job_cluster",
+# "new_cluster": {
+# "cluster_name": "",
+# "spark_version": "11.3.x-scala2.12",
+# "aws_attributes": {
+# "first_on_demand": 1,
+# "availability": "SPOT_WITH_FALLBACK",
+# "zone_id": "us-east-2b",
+# "spot_bid_price_percent": 100,
+# "ebs_volume_count": 0,
+# },
+# "node_type_id": "i3.xlarge",
+# "spark_env_vars": {"PYSPARK_PYTHON": "/databricks/python3/bin/python3"},
+# "enable_elastic_disk": False,
+# "data_security_mode": "LEGACY_SINGLE_USER_STANDARD",
+# "runtime_engine": "STANDARD",
+# "num_workers": 8,
Review Comment:
please explain this commented section. Who is we and why do we need this ?
--
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] Update Databricks workflow example DAG [airflow]
Posted by "pankajkoti (via GitHub)" <gi...@apache.org>.
pankajkoti commented on code in PR #41700:
URL: https://github.com/apache/airflow/pull/41700#discussion_r1729209328
##########
tests/system/providers/databricks/example_databricks_workflow.py:
##########
@@ -32,34 +32,53 @@
EXECUTION_TIMEOUT = int(os.getenv("EXECUTION_TIMEOUT", 6))
-DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_conn")
+DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_default")
DATABRICKS_NOTIFICATION_EMAIL = os.getenv("DATABRICKS_NOTIFICATION_EMAIL", "your_email@serviceprovider.com")
GROUP_ID = os.getenv("DATABRICKS_GROUP_ID", "1234").replace(".", "_")
USER = os.environ.get("USER")
-QUERY_ID = os.environ.get("QUERY_ID", "c9cf6468-babe-41a6-abc3-10ac358c71ee")
-WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "cf414a2206dfb397")
+QUERY_ID = os.environ.get("QUERY_ID", "d3773b5a-56f9-422c-ae60-048eaa90aa33")
+WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "368fe30b92228713")
+
+
+## We can use below specs for AWS databricks
+# "job_cluster_key": "Shared_job_cluster",
+# "new_cluster": {
+# "cluster_name": "",
+# "spark_version": "11.3.x-scala2.12",
+# "aws_attributes": {
+# "first_on_demand": 1,
+# "availability": "SPOT_WITH_FALLBACK",
+# "zone_id": "us-east-2b",
+# "spot_bid_price_percent": 100,
+# "ebs_volume_count": 0,
+# },
+# "node_type_id": "i3.xlarge",
+# "spark_env_vars": {"PYSPARK_PYTHON": "/databricks/python3/bin/python3"},
+# "enable_elastic_disk": False,
+# "data_security_mode": "LEGACY_SINGLE_USER_STANDARD",
+# "runtime_engine": "STANDARD",
+# "num_workers": 8,
Review Comment:
The current example DAG change shows job_cluster_spec for Databricks on Azure.
The commented out piece is an alternative for the users who would like to use Databricks on AWS. I modified the comment a bit.
--
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] Update Databricks workflow example DAG [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #41700:
URL: https://github.com/apache/airflow/pull/41700#discussion_r1729303772
##########
tests/system/providers/databricks/example_databricks_workflow.py:
##########
@@ -32,34 +32,53 @@
EXECUTION_TIMEOUT = int(os.getenv("EXECUTION_TIMEOUT", 6))
-DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_conn")
+DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_default")
DATABRICKS_NOTIFICATION_EMAIL = os.getenv("DATABRICKS_NOTIFICATION_EMAIL", "your_email@serviceprovider.com")
GROUP_ID = os.getenv("DATABRICKS_GROUP_ID", "1234").replace(".", "_")
USER = os.environ.get("USER")
-QUERY_ID = os.environ.get("QUERY_ID", "c9cf6468-babe-41a6-abc3-10ac358c71ee")
-WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "cf414a2206dfb397")
+QUERY_ID = os.environ.get("QUERY_ID", "d3773b5a-56f9-422c-ae60-048eaa90aa33")
+WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "368fe30b92228713")
+
+
+## We can use below specs for AWS databricks
+# "job_cluster_key": "Shared_job_cluster",
+# "new_cluster": {
+# "cluster_name": "",
+# "spark_version": "11.3.x-scala2.12",
+# "aws_attributes": {
+# "first_on_demand": 1,
+# "availability": "SPOT_WITH_FALLBACK",
+# "zone_id": "us-east-2b",
+# "spot_bid_price_percent": 100,
+# "ebs_volume_count": 0,
+# },
+# "node_type_id": "i3.xlarge",
+# "spark_env_vars": {"PYSPARK_PYTHON": "/databricks/python3/bin/python3"},
+# "enable_elastic_disk": False,
+# "data_security_mode": "LEGACY_SINGLE_USER_STANDARD",
+# "runtime_engine": "STANDARD",
+# "num_workers": 8,
Review Comment:
So this is a user facing comment. How do we expect users to know that?
We have a way of delivering examples to the docs. It should be a part of it.
--
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] Update Databricks workflow example DAG [airflow]
Posted by "pankajkoti (via GitHub)" <gi...@apache.org>.
pankajkoti merged PR #41700:
URL: https://github.com/apache/airflow/pull/41700
--
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] Update Databricks workflow example DAG [airflow]
Posted by "pankajkoti (via GitHub)" <gi...@apache.org>.
pankajkoti commented on code in PR #41700:
URL: https://github.com/apache/airflow/pull/41700#discussion_r1729209328
##########
tests/system/providers/databricks/example_databricks_workflow.py:
##########
@@ -32,34 +32,53 @@
EXECUTION_TIMEOUT = int(os.getenv("EXECUTION_TIMEOUT", 6))
-DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_conn")
+DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_default")
DATABRICKS_NOTIFICATION_EMAIL = os.getenv("DATABRICKS_NOTIFICATION_EMAIL", "your_email@serviceprovider.com")
GROUP_ID = os.getenv("DATABRICKS_GROUP_ID", "1234").replace(".", "_")
USER = os.environ.get("USER")
-QUERY_ID = os.environ.get("QUERY_ID", "c9cf6468-babe-41a6-abc3-10ac358c71ee")
-WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "cf414a2206dfb397")
+QUERY_ID = os.environ.get("QUERY_ID", "d3773b5a-56f9-422c-ae60-048eaa90aa33")
+WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "368fe30b92228713")
+
+
+## We can use below specs for AWS databricks
+# "job_cluster_key": "Shared_job_cluster",
+# "new_cluster": {
+# "cluster_name": "",
+# "spark_version": "11.3.x-scala2.12",
+# "aws_attributes": {
+# "first_on_demand": 1,
+# "availability": "SPOT_WITH_FALLBACK",
+# "zone_id": "us-east-2b",
+# "spot_bid_price_percent": 100,
+# "ebs_volume_count": 0,
+# },
+# "node_type_id": "i3.xlarge",
+# "spark_env_vars": {"PYSPARK_PYTHON": "/databricks/python3/bin/python3"},
+# "enable_elastic_disk": False,
+# "data_security_mode": "LEGACY_SINGLE_USER_STANDARD",
+# "runtime_engine": "STANDARD",
+# "num_workers": 8,
Review Comment:
The current example DAG change shows job_cluster_spec for Databricks on Azure.
The commented out piece is an alternative for the users who would like to use the Databricks on AWS. I modified the comment a bit.
--
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] Update Databricks workflow example DAG [airflow]
Posted by "pankajkoti (via GitHub)" <gi...@apache.org>.
pankajkoti commented on code in PR #41700:
URL: https://github.com/apache/airflow/pull/41700#discussion_r1729210789
##########
tests/system/providers/databricks/example_databricks_workflow.py:
##########
@@ -32,34 +32,59 @@
EXECUTION_TIMEOUT = int(os.getenv("EXECUTION_TIMEOUT", 6))
-DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_conn")
+DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_default")
DATABRICKS_NOTIFICATION_EMAIL = os.getenv("DATABRICKS_NOTIFICATION_EMAIL", "your_email@serviceprovider.com")
GROUP_ID = os.getenv("DATABRICKS_GROUP_ID", "1234").replace(".", "_")
USER = os.environ.get("USER")
-QUERY_ID = os.environ.get("QUERY_ID", "c9cf6468-babe-41a6-abc3-10ac358c71ee")
-WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "cf414a2206dfb397")
+QUERY_ID = os.environ.get("QUERY_ID", "d3773b5a-56f9-422c-ae60-048eaa90aa33")
+WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "368fe30b92228713")
+
+
+# You can use below the job_cluster_spec for Databricks on AWS
+# job_cluster_spec = [
+# {
+# "job_cluster_key": "Shared_job_cluster",
+# "new_cluster": {
+# "cluster_name": "",
+# "spark_version": "11.3.x-scala2.12",
+# "aws_attributes": {
+# "first_on_demand": 1,
+# "availability": "SPOT_WITH_FALLBACK",
+# "zone_id": "us-east-2b",
+# "spot_bid_price_percent": 100,
+# "ebs_volume_count": 0,
+# },
+# "node_type_id": "i3.xlarge",
+# "spark_env_vars": {"PYSPARK_PYTHON": "/databricks/python3/bin/python3"},
+# "enable_elastic_disk": False,
+# "data_security_mode": "LEGACY_SINGLE_USER_STANDARD",
+# "runtime_engine": "STANDARD",
+# "num_workers": 8,
+# },
+# }
+# ]
+
Review Comment:
```suggestion
# job_cluster_spec example for Databricks on Azure
```
--
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] Update Databricks workflow example DAG [airflow]
Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on code in PR #41700:
URL: https://github.com/apache/airflow/pull/41700#discussion_r1730848191
##########
tests/system/providers/databricks/example_databricks_workflow.py:
##########
@@ -32,34 +32,53 @@
EXECUTION_TIMEOUT = int(os.getenv("EXECUTION_TIMEOUT", 6))
-DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_conn")
+DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_default")
DATABRICKS_NOTIFICATION_EMAIL = os.getenv("DATABRICKS_NOTIFICATION_EMAIL", "your_email@serviceprovider.com")
GROUP_ID = os.getenv("DATABRICKS_GROUP_ID", "1234").replace(".", "_")
USER = os.environ.get("USER")
-QUERY_ID = os.environ.get("QUERY_ID", "c9cf6468-babe-41a6-abc3-10ac358c71ee")
-WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "cf414a2206dfb397")
+QUERY_ID = os.environ.get("QUERY_ID", "d3773b5a-56f9-422c-ae60-048eaa90aa33")
+WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "368fe30b92228713")
+
+
+## We can use below specs for AWS databricks
+# "job_cluster_key": "Shared_job_cluster",
+# "new_cluster": {
+# "cluster_name": "",
+# "spark_version": "11.3.x-scala2.12",
+# "aws_attributes": {
+# "first_on_demand": 1,
+# "availability": "SPOT_WITH_FALLBACK",
+# "zone_id": "us-east-2b",
+# "spot_bid_price_percent": 100,
+# "ebs_volume_count": 0,
+# },
+# "node_type_id": "i3.xlarge",
+# "spark_env_vars": {"PYSPARK_PYTHON": "/databricks/python3/bin/python3"},
+# "enable_elastic_disk": False,
+# "data_security_mode": "LEGACY_SINGLE_USER_STANDARD",
+# "runtime_engine": "STANDARD",
+# "num_workers": 8,
Review Comment:
@eladkal I have removed the comment block and will open a separate PR for AWS example
--
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] Update Databricks workflow example DAG [airflow]
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #41700:
URL: https://github.com/apache/airflow/pull/41700#discussion_r1729203012
##########
tests/system/providers/databricks/example_databricks_workflow.py:
##########
@@ -32,34 +32,53 @@
EXECUTION_TIMEOUT = int(os.getenv("EXECUTION_TIMEOUT", 6))
-DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_conn")
+DATABRICKS_CONN_ID = os.getenv("DATABRICKS_CONN_ID", "databricks_default")
DATABRICKS_NOTIFICATION_EMAIL = os.getenv("DATABRICKS_NOTIFICATION_EMAIL", "your_email@serviceprovider.com")
GROUP_ID = os.getenv("DATABRICKS_GROUP_ID", "1234").replace(".", "_")
USER = os.environ.get("USER")
-QUERY_ID = os.environ.get("QUERY_ID", "c9cf6468-babe-41a6-abc3-10ac358c71ee")
-WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "cf414a2206dfb397")
+QUERY_ID = os.environ.get("QUERY_ID", "d3773b5a-56f9-422c-ae60-048eaa90aa33")
+WAREHOUSE_ID = os.environ.get("WAREHOUSE_ID", "368fe30b92228713")
+
+
+## We can use below specs for AWS databricks
+# "job_cluster_key": "Shared_job_cluster",
+# "new_cluster": {
+# "cluster_name": "",
+# "spark_version": "11.3.x-scala2.12",
+# "aws_attributes": {
+# "first_on_demand": 1,
+# "availability": "SPOT_WITH_FALLBACK",
+# "zone_id": "us-east-2b",
+# "spot_bid_price_percent": 100,
+# "ebs_volume_count": 0,
+# },
+# "node_type_id": "i3.xlarge",
+# "spark_env_vars": {"PYSPARK_PYTHON": "/databricks/python3/bin/python3"},
+# "enable_elastic_disk": False,
+# "data_security_mode": "LEGACY_SINGLE_USER_STANDARD",
+# "runtime_engine": "STANDARD",
+# "num_workers": 8,
Review Comment:
please explain this commented section. Who is we ? who is suppose to use this comment block?
--
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