id
stringlengths
7
11
source
stringclasses
1 value
category
stringclasses
11 values
title
stringlengths
15
214
text
stringlengths
70
30.5k
url
stringlengths
57
160
tags
stringlengths
3
113
created_at
int64
1.22B
1.79B
se_63127263
stackoverflow
DATA_ENGINEERING
How to select all columns except 2 of them from a large table on pyspark sql?
How to select all columns except 2 of them from a large table on pyspark sql? In joining two tables, I would like to select all columns except 2 of them from a large table with many columns on pyspark sql on databricks. My pyspark sql: %sql set hive.support.quoted.identifiers=none; select a.*, '?!(b.year|b.month)$)...
https://stackoverflow.com/questions/63127263/how-to-select-all-columns-except-2-of-them-from-a-large-table-on-pyspark-sql
python, sql, apache-spark, pyspark, hive
1,595,912,061
se_79424580
stackoverflow
DATA_ENGINEERING
How to gracefully decomission spark executors
How to gracefully decomission spark executors I am using df.cache() to cachce a dataframe and using databricks autoscaling with Min instance as 1 and Max instance as 8. But cache don't work properly here because some executors dies in the middle of execution and cached data also got lost. When I set the min and max in...
https://stackoverflow.com/questions/79424580/how-to-gracefully-decomission-spark-executors
dataframe, apache-spark, databricks, executor
1,739,088,438
se_75048688
stackoverflow
DATA_ENGINEERING
PicklingError: Could not serialize object: IndexError: tuple index out of range
PicklingError: Could not serialize object: IndexError: tuple index out of range I initiated pyspark in cmd and performed below to sharpen my skills. C:\Users\Administrator>SUCCESS: The process with PID 5328 (child process of PID 4476) has been terminated. SUCCESS: The process with PID 4476 (child process of PID 1092) ...
https://stackoverflow.com/questions/75048688/picklingerror-could-not-serialize-object-indexerror-tuple-index-out-of-range
python, apache-spark, pyspark, rdd
1,673,189,262
se_76328743
stackoverflow
DATA_ENGINEERING
PySpark error: Append output mode not supported when there are streaming aggregations on streaming DataFrames without watermark
PySpark error: Append output mode not supported when there are streaming aggregations on streaming DataFrames without watermark I have a kafka topic streaming some user data with each message of the following format: message1 = {'username': 'user1', 'account_balance': 25.0} message2 = {'username': 'user2', 'account_ba...
https://stackoverflow.com/questions/76328743/pyspark-error-append-output-mode-not-supported-when-there-are-streaming-aggrega
apache-spark, pyspark, cassandra
1,684,985,365
se_79422491
stackoverflow
DATA_ENGINEERING
Spark Connect SQL Parsing Exception - Spark 3.5.3 and 3.5.4
Spark Connect SQL Parsing Exception - Spark 3.5.3 and 3.5.4 I'm running spark connect locally and I keep getting parsing exceptions any time I try to run a pure sql query, even on extremely basic queries. Im running this on a fresh spark 3.5.4 install: $SPARK_HOME/sbin/start-connect-server.sh --packages org.apache.spa...
https://stackoverflow.com/questions/79422491/spark-connect-sql-parsing-exception-spark-3-5-3-and-3-5-4
apache-spark, apache-spark-sql
1,738,978,123
se_72517346
stackoverflow
DATA_ENGINEERING
Get timestamp in PySpark from GregorianCalendar
Get timestamp in PySpark from GregorianCalendar The Spark Dataframe has a column where the value is GregorianCalendar as below: java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Etc/UTC",offset=0,dstSavings=0,useDaylight=false,transitions=0,las...
https://stackoverflow.com/questions/72517346/get-timestamp-in-pyspark-from-gregoriancalendar
apache-spark, pyspark, apache-spark-sql, timestamp, gregorian-calendar
1,654,516,685
se_79419664
stackoverflow
DATA_ENGINEERING
Does a Spark dataframe read from a delta table auto-refresh?
Does a Spark dataframe read from a delta table auto-refresh? I've inherited some Spark code and am having trouble understanding "why does this even work". Short-short is that I load a DF with info from a delta table, and then join that to a streaming DF. I would expect that that first DF would never refresh itself, ...
https://stackoverflow.com/questions/79419664/does-a-spark-dataframe-read-from-a-delta-table-auto-refresh
scala, apache-spark, databricks, spark-streaming, azure-databricks
1,738,886,270
se_79416930
stackoverflow
DATA_ENGINEERING
Syntax error at or near CLUSTER when altering clustered column in delta table
Syntax error at or near CLUSTER when altering clustered column in delta table I'm following delta lake liquid clustering document, and got an error [PARSE_SYNTAX_ERROR] Syntax error at or near 'CLUSTER'.. As I understood, the following code should work since it is supported by delta lake 3.3. Versions This is the pyt...
https://stackoverflow.com/questions/79416930/syntax-error-at-or-near-cluster-when-altering-clustered-column-in-delta-table
apache-spark, pyspark, delta-lake
1,738,822,617
se_69041917
stackoverflow
DATA_ENGINEERING
Apache Spark: "with as" vs "cache"
Apache Spark: "with as" vs "cache" "With as" SQL clause, also referred as CTE, is known as a handy way to improve readability of the queries. As far as I understand in classic SQL CTE results are NOT cached, and each CTE is just replaced by relevant SQL, and not by resultset of relevant SQL. So giv...
https://stackoverflow.com/questions/69041917/apache-spark-with-as-vs-cache
sql, apache-spark, hive, common-table-expression
1,630,658,320
se_79420346
stackoverflow
DATA_ENGINEERING
Syntax error at or near ':'(line 1, pos 2) - PARSE_SYNTAX_ERROR - == SQL ==
Syntax error at or near ':'(line 1, pos 2) - PARSE_SYNTAX_ERROR - == SQL == I'm trying to read two JSON files at a time from AWS S3 bucket. getting error PARSE_SYNTAX_ERROR but when i'm reading single file, it is working fine. Using AWS Glue for execution. file_paths = [ "s3://test_bt/data/batch_date=20241...
https://stackoverflow.com/questions/79420346/syntax-error-at-or-near-line-1-pos-2-parse-syntax-error-sql
python, amazon-web-services, apache-spark, amazon-s3, pyspark
1,738,920,294
se_65558687
stackoverflow
DATA_ENGINEERING
DateTime datatype in BigQuery
DateTime datatype in BigQuery I have a partitioned table where one of the column is of type DateTime and the table is partitioned on same column. According to spark-bigquery documentation, the corresponding Spark SQL type is of String type. https://github.com/GoogleCloudDataproc/spark-bigquery-connector I tried doing...
https://stackoverflow.com/questions/65558687/datetime-datatype-in-bigquery
apache-spark, google-bigquery
1,609,743,013
se_79414317
stackoverflow
DATA_ENGINEERING
Apache Spark and pyspark not working, simple python script causes exception
Apache Spark and pyspark not working, simple python script causes exception I installed Apache Spark to the best of my knowledge; however, it does not work :-( To test my installation, I use the following python script: from pyspark.sql import SparkSession # Create a Spark session spark = SparkSession...
https://stackoverflow.com/questions/79414317/apache-spark-and-pyspark-not-working-simple-python-script-causes-exception
apache-spark
1,738,748,972
se_79414230
stackoverflow
DATA_ENGINEERING
How to add or delete columns on liquid clustering enabled delta table?
How to add or delete columns on liquid clustering enabled delta table? I have delta table enabled liquid clustering. I wonder is there any way to modify a column of the delta table with pyspark. I tried the following approach but didn't work. DeltaTable.createOrReplace() \ .tableName("SAMPLE") \ .addColumn("NAME",...
https://stackoverflow.com/questions/79414230/how-to-add-or-delete-columns-on-liquid-clustering-enabled-delta-table
apache-spark, pyspark, delta-lake
1,738,747,542
se_72466751
stackoverflow
DATA_ENGINEERING
emr-dynamodb-connector control/throttle the writes to DDB (Throughput exceeds the current throughput limit for your account.)
emr-dynamodb-connector control/throttle the writes to DDB (Throughput exceeds the current throughput limit for your account.) I am trying to write 1 TB / 30 million documents to DDB table. DDB table is set for On-demand capacity. For that i am using emr-dynamodb-connector by running spark job on EMR cluster. Code look...
https://stackoverflow.com/questions/72466751/emr-dynamodb-connector-control-throttle-the-writes-to-ddb-throughput-exceeds-th
amazon-web-services, apache-spark, apache-spark-sql, amazon-dynamodb, amazon-emr
1,654,109,414
se_79415362
stackoverflow
DATA_ENGINEERING
Spark + Spring + Validator class file for javax.validation.ValidatorFactory not found
Spark + Spring + Validator class file for javax.validation.ValidatorFactory not found I trying to upgrade from: Java 8 Spring 2.7 Spark 3.3 scala 2.12 To Java 17 Spring 3.1.2 Spark 3.5.0 scala 2.12 Application running on k8s but my problem come when I try to do some local testing. According to some use case seen and d...
https://stackoverflow.com/questions/79415362/spark-spring-validator-class-file-for-javax-validation-validatorfactory-not
spring, spring-boot, apache-spark, validation
1,738,770,840
se_78087466
stackoverflow
DATA_ENGINEERING
Replace dataframe with its alias in select in pyspark
Replace dataframe with its alias in select in pyspark I am trying to learn about the dataframe alias command in pyspark. Here is what I observe. Suppose I have a sample dataframe t1_df = spark.createDataFrame([['a'], ['b']], 'c1: string') print(t1_df.show()) +---+ | c1| +---+ | a| | b| +---+ Now I have created its...
https://stackoverflow.com/questions/78087466/replace-dataframe-with-its-alias-in-select-in-pyspark
dataframe, apache-spark, alias
1,709,293,096
se_70005490
stackoverflow
DATA_ENGINEERING
Get difference between two version of delta lake table
Get difference between two version of delta lake table how to find the difference between two last versions of a Delta Table ? Here is as far as I went using dataframes : val df1 = spark.read .format("delta") .option("versionAsOf", "0001") .load("/path/to/my/table") val df2 = spark.read .format("delta") .op...
https://stackoverflow.com/questions/70005490/get-difference-between-two-version-of-delta-lake-table
scala, apache-spark, delta-lake
1,637,156,659
se_37927154
stackoverflow
DATA_ENGINEERING
How to write a condition based on multiple values for a DataFrame in Spark
How to write a condition based on multiple values for a DataFrame in Spark I'm working on a Spark Application (using Scala) and I have a List which contains multiple values. I'd like to use this list in order to write a where clause for my DataFrame and select only a subset on tuples. For example, my List contains 'va...
https://stackoverflow.com/questions/37927154/how-to-write-a-condition-based-on-multiple-values-for-a-dataframe-in-spark
scala, apache-spark
1,466,438,998
se_79411961
stackoverflow
DATA_ENGINEERING
Is 'E' character special in Spark SQL
Is 'E' character special in Spark SQL I'm trying to concatenate three columns into one using Spark SQL and concat function. One of the columns gets value 'E', and when concatenated together with other two columns, returns unexpected value. Here is the example of what is happening: select concat('22','E','0...
https://stackoverflow.com/questions/79411961/is-e-character-special-in-spark-sql
apache-spark
1,738,677,795
se_79369663
stackoverflow
DATA_ENGINEERING
Unable to authenticate S3 with S3A pyspark config. I want to get the code to work in EMR hence, avoiding the temporal credentials for 1 hour
Unable to authenticate S3 with S3A pyspark config. I want to get the code to work in EMR hence, avoiding the temporal credentials for 1 hour Error: org.apache.hadoop.fs.s3a.auth.NoAuthWithAWSException: No AWS Credentials provided by TemporaryAWSCredentialsProvider SimpleAWSCredentialsProvider EnvironmentVariableCreden...
https://stackoverflow.com/questions/79369663/unable-to-authenticate-s3-with-s3a-pyspark-config-i-want-to-get-the-code-to-wor
java, apache-spark, amazon-s3
1,737,316,461
se_38733928
stackoverflow
DATA_ENGINEERING
Convert RDD of LabeledPoint to DataFrame toDF() Error
Convert RDD of LabeledPoint to DataFrame toDF() Error I have a dataframe df which contains 13 values separated with comma. I want to get in df2 a dataFrame which contains labeledPoint. first value is label, twelve others are features. I use a split and select method to divide string with 13 value into an array of 13 v...
https://stackoverflow.com/questions/38733928/convert-rdd-of-labeledpoint-to-dataframe-todf-error
python, apache-spark, pyspark, rdd, apache-spark-sql
1,470,195,303
se_46096524
stackoverflow
DATA_ENGINEERING
Custom OrderBy in Spark SQL
Custom OrderBy in Spark SQL I have two columns that need to be sorted in a custom way. For Eg: Month Column it should be sorted in a way that Jan2015 to Dec(CurrentYear) and Also suppose I have Column as Quarter and I want it to or Order by as Q1-2015,Q2-2015,... Q4-CurrentYear .. in orderby of Spark Sql I'll b...
https://stackoverflow.com/questions/46096524/custom-orderby-in-spark-sql
apache-spark, apache-spark-sql
1,504,787,700
se_77797606
stackoverflow
DATA_ENGINEERING
Rowencoder.apply and rowencoder.encoderfor methods in spark catalyst package
Rowencoder.apply and rowencoder.encoderfor methods in spark catalyst package I am trying to create a dataset and I have RDD and a schema of structtype. In spark 3.5.0 and above the Rowencoder.apply method is been removed and have introduced new method called Rowencoder.encoderfor which will return agnosticencoder inst...
https://stackoverflow.com/questions/77797606/rowencoder-apply-and-rowencoder-encoderfor-methods-in-spark-catalyst-package
apache-spark, apache-spark-encoders
1,704,945,796
se_79409000
stackoverflow
DATA_ENGINEERING
Issue: Hive Metastore Not Resolvable in Spark Cluster Mode
Issue: Hive Metastore Not Resolvable in Spark Cluster Mode Apache Spark Cluster Mode Error: NoSuchFieldError: METASTOREURIS I am running Apache Spark with Hive Metastore on YARN. The setup consists of: One Edge Node (running inside containers, using --network host mode): Hive Metastore PostgreSQL (as the Hive Metast...
https://stackoverflow.com/questions/79409000/issue-hive-metastore-not-resolvable-in-spark-cluster-mode
docker, apache-spark, pyspark, hive, hadoop-yarn
1,738,590,171
se_68585484
stackoverflow
DATA_ENGINEERING
Databricks secret visible in cleartext
Databricks secret visible in cleartext I have a requirement that I need a secret when starting a cluster in databricks. And I found following way of providing the secret to my init script. https://docs.databricks.com/security/secrets/secrets.html#store-the-path-to-a-secret-in-an-environment-variable . Now this worked ...
https://stackoverflow.com/questions/68585484/databricks-secret-visible-in-cleartext
azure, apache-spark, databricks, azure-databricks, azure-keyvault
1,627,619,758
se_27181737
stackoverflow
DATA_ENGINEERING
How to deal with executor memory and driver memory in Spark?
How to deal with executor memory and driver memory in Spark? I am confused about dealing with executor memory and driver memory in Spark. My environment settings are as below: Memory 128 G, 16 CPU for 9 VM Centos Hadoop 2.5.0-cdh5.2.0 Spark 1.1.0 Input data information: 3.5 GB data file from HDFS For simple d...
https://stackoverflow.com/questions/27181737/how-to-deal-with-executor-memory-and-driver-memory-in-spark
memory-management, apache-spark
1,417,147,620
se_78771358
stackoverflow
DATA_ENGINEERING
How do you handle Big Datasets for training XGboost?
How do you handle Big Datasets for training XGboost? I had a dataset which has 530 classes and it was heavily imbalanced so as I am new to handling such large datasets I undersampled the top 10 majority classes and then concatenated it with other data and oversampled the dataset which came up to be 5,000,000 rows and ...
https://stackoverflow.com/questions/78771358/how-do-you-handle-big-datasets-for-training-xgboost
apache-spark, dask, amazon-sagemaker, xgboost
1,721,427,393
se_48221164
stackoverflow
DATA_ENGINEERING
Could not read data from kafka using pyspark
Could not read data from kafka using pyspark I've a streaming data in my kafka topic. I need to read this data from topic using pyspark inthe form of pyspark dataframe. But I'm continuously receiving error when I'm calling readStream function. The error is "py4j.protocol.Py4JJavaError: An error occurred while calling ...
https://stackoverflow.com/questions/48221164/could-not-read-data-from-kafka-using-pyspark
apache-spark, pyspark, apache-kafka, spark-structured-streaming
1,515,740,571
se_40048919
stackoverflow
DATA_ENGINEERING
What is the difference between rowsBetween and rangeBetween?
What is the difference between rowsBetween and rangeBetween? From the PySpark docs rangeBetween: rangeBetween(start, end) Defines the frame boundaries, from start (inclusive) to end (inclusive). Both start and end are relative from the current row. For example, “0” means “current row”, while “-1” means o...
https://stackoverflow.com/questions/40048919/what-is-the-difference-between-rowsbetween-and-rangebetween
sql, apache-spark, pyspark, apache-spark-sql, window-functions
1,476,466,328
se_79403433
stackoverflow
DATA_ENGINEERING
Spark on AKS spins up driver but not executors
Spark on AKS spins up driver but not executors My set up is: AKS in a subnet, managed control-plane. Created namespace created service account with token, role and rolebinding Pulled kubeconfig for service account Trying to run a simple spark-submit with following command: ./bin/spark-submit --master k8s://https://A...
https://stackoverflow.com/questions/79403433/spark-on-aks-spins-up-driver-but-not-executors
apache-spark, azure-aks
1,738,342,206
se_78326548
stackoverflow
DATA_ENGINEERING
Need way we can increase the size of ByteBuffer or option to read a file iterating byte by byte(not reading whole file at once) in spark / pyspark?
Need way we can increase the size of ByteBuffer or option to read a file iterating byte by byte(not reading whole file at once) in spark / pyspark? We are using Spark to read Abinitio written source data that is a binary Fixed length format files which are encoded. We need to read it byte by byte as few fields in data...
https://stackoverflow.com/questions/78326548/need-way-we-can-increase-the-size-of-bytebuffer-or-option-to-read-a-file-iterati
python, apache-spark, pyspark
1,713,163,952
se_59511576
stackoverflow
DATA_ENGINEERING
Chaining Delta Streams programmatically raising AnalysisException
Chaining Delta Streams programmatically raising AnalysisException Situation : I am producing a delta folder with data from a previous Streaming Query A, and reading later from another DF, as shown here DF_OUT.writeStream.format("delta").(...).start("path") (...) DF_IN = spark.readStream.format("delta").load("path)...
https://stackoverflow.com/questions/59511576/chaining-delta-streams-programmatically-raising-analysisexception
apache-spark, spark-structured-streaming, delta-lake
1,577,541,749
se_46740670
stackoverflow
DATA_ENGINEERING
No FileSystem for scheme: s3 with pyspark
No FileSystem for scheme: s3 with pyspark I'm trying to read a txt file from S3 with Spark, but I'm getting thhis error: No FileSystem for scheme: s3 This is my code: from pyspark import SparkContext, SparkConf conf = SparkConf().setAppName("first") sc = SparkContext(conf=conf) data = sc.textFile("s3://"+AWS_ACCES...
https://stackoverflow.com/questions/46740670/no-filesystem-for-scheme-s3-with-pyspark
python, python-2.7, apache-spark
1,507,952,842
se_79388838
stackoverflow
DATA_ENGINEERING
Configure pySpark join to handle bucketed datasets
Configure pySpark join to handle bucketed datasets Apache Spark 3.2: I have 2 bucketed datasets in parquet files, bucketed with the same column (visitor_id) and same amount of buckets (1024) I would like to join them and my question is, how can i configure the join in such a way that Spark is aware of the bucketing an...
https://stackoverflow.com/questions/79388838/configure-pyspark-join-to-handle-bucketed-datasets
apache-spark, pyspark
1,737,907,529
se_79362778
stackoverflow
DATA_ENGINEERING
Understand Databricks Structured Streaming Spill to Disk Behavior
Understand Databricks Structured Streaming Spill to Disk Behavior I am a running streaming pipeline on Databricks using Pyspark (128gb Memory Cluster with DBR 14.3, Spark 3.5.0). This stream is processing zipped json files and merging them into a delta table. For this Pipeline the data has about 20 columns, not conta...
https://stackoverflow.com/questions/79362778/understand-databricks-structured-streaming-spill-to-disk-behavior
apache-spark, pyspark, databricks, azure-databricks, spark-structured-streaming
1,737,053,829
se_78178043
stackoverflow
DATA_ENGINEERING
Spark job fails with "Python worker exited unexpectedly (crashed)" error
Spark job fails with "Python worker exited unexpectedly (crashed)" error I'm encountering an issue while running a Spark job that processes data using Python. The job fails with the following error message: org.apache.spark.SparkException: Python worker exited unexpectedly (crashed) I'm submitting a Python s...
https://stackoverflow.com/questions/78178043/spark-job-fails-with-python-worker-exited-unexpectedly-crashed-error
python, apache-spark, pyspark, apache-spark-sql
1,710,738,332
se_79402222
stackoverflow
DATA_ENGINEERING
PySpark foreach() is not implemented
PySpark foreach() is not implemented I have PySpark in my local environment: pyspark[sql]==3.5.0 And SPARK_REMOTE pointing to Databricks: SPARK_REMOTE=SPARK_REMOTE=sc://{dbx_workspace}:443/;x-databricks-cluster-id={dbx_cluster_id};token={pat} If I call df.foreach(my_function) I get: raise PySparkNotImplementedError( p...
https://stackoverflow.com/questions/79402222/pyspark-foreach-is-not-implemented
apache-spark, pyspark, databricks, azure-databricks
1,738,314,259
se_63703181
stackoverflow
DATA_ENGINEERING
How to throw Exception in Databricks?
How to throw Exception in Databricks? I want my Databricks notebook to fail if a certain condition is satisfied. Right now I am using dbutils.notebook.exit() but it does not cause the notebook to fail and I will get mail like notebook run is successful. How can I make my notebook fail?
https://stackoverflow.com/questions/63703181/how-to-throw-exception-in-databricks
apache-spark, pyspark, databricks, azure-databricks
1,599,040,914
se_38867472
stackoverflow
DATA_ENGINEERING
Spark - SELECT WHERE or filtering?
Spark - SELECT WHERE or filtering? What's the difference between selecting with a where clause and filtering in Spark? Are there any use cases in which one is more appropriate than the other one? When do I use DataFrame newdf = df.select(df.col("*")).where(df.col("somecol").leq(10)) and when is DataFrame newdf...
https://stackoverflow.com/questions/38867472/spark-select-where-or-filtering
apache-spark, apache-spark-sql
1,470,816,068
se_79399577
stackoverflow
DATA_ENGINEERING
Are Spark checkpoints invalidated when source data is changed?
Are Spark checkpoints invalidated when source data is changed? I'm trying to understand the behaviour of (py)Spark checkpointing. Let's say there is some source data (s3 or HDFS) A with intermediate RDDs checkpoints B and C: If the source data changes (e.g. new data is added), will B and C be recalculated? If not, is ...
https://stackoverflow.com/questions/79399577/are-spark-checkpoints-invalidated-when-source-data-is-changed
apache-spark, pyspark
1,738,233,399
se_45321924
stackoverflow
DATA_ENGINEERING
How to read the json file in spark using scala?
How to read the json file in spark using scala? I want to read the JSON file in the below format:- { "titlename": "periodic", "atom": [ { "usage": "neutron", "dailydata": [ { "utcacquisitiontime": "2017-03-27T22:00:00Z", "datatimezone": "+02:00", "intervalvalu...
https://stackoverflow.com/questions/45321924/how-to-read-the-json-file-in-spark-using-scala
json, scala, apache-spark
1,501,058,984
se_79396113
stackoverflow
DATA_ENGINEERING
Can we stop or pause already running optimize on delta table
Can we stop or pause already running optimize on delta table Is there any way to stop or pause an already running optmize on delta table started using val deltaTable = DeltaTable.forPath(spark, deltaTablePath) deltaTable.optimize().executeCompaction()
https://stackoverflow.com/questions/79396113/can-we-stop-or-pause-already-running-optimize-on-delta-table
apache-spark, databricks, delta
1,738,139,252
se_76329028
stackoverflow
DATA_ENGINEERING
how to create a spark v2 table with spark sql?
how to create a spark v2 table with spark sql? use spark.sql create a table in hive metastore CREATE TABLE db_test.table_test ( name STRING, status STRING, field1 BIGINT, field2 BIGINT, data_dt STRING) USING parquet PARTITIONED BY (data_dt) LOCATION 's3://somebucket/db_test.db/table_test'; then if i try to ...
https://stackoverflow.com/questions/76329028/how-to-create-a-spark-v2-table-with-spark-sql
apache-spark, apache-spark-sql
1,684,990,291
se_79224196
stackoverflow
DATA_ENGINEERING
Unable to start thrift-server due to class org.apache.hadoop.yarn.server.webproxy.amfilter.AmIpFilter is not a javax.servlet.Filter
Unable to start thrift-server due to class org.apache.hadoop.yarn.server.webproxy.amfilter.AmIpFilter is not a javax.servlet.Filter On starting spark-thrift-server using java 1.8, spark-3.5.0-bin-hadoop3 and hadoop-3.3.6... spark-submit showing the job is submitted, running and completed within few seconds successfu...
https://stackoverflow.com/questions/79224196/unable-to-start-thrift-server-due-to-class-org-apache-hadoop-yarn-server-webprox
java, apache-spark, thrift, spark-thriftserver
1,732,558,857
se_55461843
stackoverflow
DATA_ENGINEERING
filter only not empty arrays dataframe spark
filter only not empty arrays dataframe spark How can i filter only not empty arrays import org.apache.spark.sql.types.ArrayType val arrayFields = secondDF.schema.filter(st => st.dataType.isInstanceOf[ArrayType]) val names = arrayFields.map(_.name) Or is this code val DF1=DF.select(col("key"),explode(col("ob"))....
https://stackoverflow.com/questions/55461843/filter-only-not-empty-arrays-dataframe-spark
scala, apache-spark, apache-spark-sql
1,554,145,178
se_79395053
stackoverflow
DATA_ENGINEERING
Escape a single quote in plain Databricks SQL
Escape a single quote in plain Databricks SQL I want to count rows dynamically from multiple tables in a schema in (preferably) plain Databricks SQL. I also want the tablename to be displayed before the number of rows. Something like this: table name rowcount sales_customers 134 sales_franchises 200 sales_s...
https://stackoverflow.com/questions/79395053/escape-a-single-quote-in-plain-databricks-sql
sql, apache-spark, apache-spark-sql, databricks
1,738,094,780
se_31975457
stackoverflow
DATA_ENGINEERING
Apache Calcite Data Federation Usecase
Apache Calcite Data Federation Usecase Just want to check if the Apache Calcite can be used for the use case "Data Federation"(query with multiple databases). The idea is I have a master query (5 tables) that has tables from one database (say Hive) and 3 tables from another database (say MySQL). Can I execute ...
https://stackoverflow.com/questions/31975457/apache-calcite-data-federation-usecase
apache-spark, apache-calcite
1,439,413,760
se_68196969
stackoverflow
DATA_ENGINEERING
What are the _STARTED_, _COMMITTED_ , and _SUCCESS_ files in a Spark Parquet table?
What are the _STARTED_, _COMMITTED_ , and _SUCCESS_ files in a Spark Parquet table? What are the STARTED, COMMITTED , and SUCCESS files that are created in the underlying storage folder when writing/creating a Spark Parquet table? Can there be multiple of those file? If so, what does it mean to have more than one of t...
https://stackoverflow.com/questions/68196969/what-are-the-started-committed-and-success-files-in-a-spark-parquet-tab
apache-spark, parquet
1,625,064,256
se_55430806
stackoverflow
DATA_ENGINEERING
How can I get all names of the arrays on Dataframe
How can I get all names of the arrays on Dataframe How can I get all names of the arrays on Dataframe ? The problem is i am trying to explode ALL arrays. import org.apache.spark.sql.{Column, DataFrame, SparkSession} import org.apache.spark.sql.functions.col import org.apache.spark.sql.types.{ArrayType, StructField, St...
https://stackoverflow.com/questions/55430806/how-can-i-get-all-names-of-the-arrays-on-dataframe
scala, apache-spark, apache-spark-sql
1,553,944,080
se_55398372
stackoverflow
DATA_ENGINEERING
create a Spark DataFrame from a nested array of struct element?
create a Spark DataFrame from a nested array of struct element? I have read a JSON file into Spark. This file has the following structure: root |-- a: struct (nullable = true) | |-- rt: array (nullable = true) | | |-- element: struct (containsNull = true) | | | |-- rb: struct...
https://stackoverflow.com/questions/55398372/create-a-spark-dataframe-from-a-nested-array-of-struct-element
scala, apache-spark, apache-spark-sql
1,553,778,244
se_55123464
stackoverflow
DATA_ENGINEERING
Executing multiple SQL queries on Spark - Table or view not found
Executing multiple SQL queries on Spark - Table or view not found I trying to execute these spark statements but it is not working spark.sql("CREATE OR REPLACE GLOBAL TEMPORARY VIEW VIEW_1 AS SELECT * from orc.`/apps/hive/warehouse/userdb.db/rb`") spark.sql("CREATE OR REPLACE GLOBAL TEMPORARY VIEW VIEW_2 AS SELEC...
https://stackoverflow.com/questions/55123464/executing-multiple-sql-queries-on-spark-table-or-view-not-found
apache-spark, apache-spark-sql, spark-streaming
1,552,399,656
se_58302262
stackoverflow
DATA_ENGINEERING
spark UI - Understand metrics memory used
spark UI - Understand metrics memory used Could you please help me understand the metrics on spark UI Memory: 10 MB Used (552.6 GB Total) PartitionNumber.nbExecutors = conf.getInt("spark.executor.instances", 20) PartitionNumber.nbPartitions = PartitionNumber.nbExecutors * conf.getInt("spark.executor.cores", 2) * 3 c...
https://stackoverflow.com/questions/58302262/spark-ui-understand-metrics-memory-used
scala, apache-spark, apache-spark-sql, spark-streaming
1,570,617,451
se_47036486
stackoverflow
DATA_ENGINEERING
What is prefer , bucket or repartition?
What is prefer , bucket or repartition? I have 2 spark jobs one is pre-process and the second is the process. Process job needs to calculate for each user in the data. I want to avoid shuffle like groupBy so I think about to save the result of the pre-process as bucket by user in Parquet or to re-partition by user an...
https://stackoverflow.com/questions/47036486/what-is-prefer-bucket-or-repartition
apache-spark, hive, apache-spark-sql
1,509,456,002
se_79391729
stackoverflow
DATA_ENGINEERING
Read fixed length file with batches
Read fixed length file with batches I have a text file with fixed length format like below - K57 details 1234 K58 abcdefghijklmnopqrstuvwxyz 0123456789 K58 abcdefghijklmnopqrstuvwxyz 0123456789 K58 abcdefghijklmnopqrstuvwxyz 0123456789 K57 details 5678 K58 abcdefghijklmnopqrstuvwxyz 9876543210 K58 abcdefghijklmnop...
https://stackoverflow.com/questions/79391729/read-fixed-length-file-with-batches
python, apache-spark, pyspark, apache-spark-sql
1,738,000,634
se_79388032
stackoverflow
DATA_ENGINEERING
UDF method sim(String[] a, String[] b), where a and b come from two different datasets, receives the same value for both parameters
UDF method sim(String[] a, String[] b), where a and b come from two different datasets, receives the same value for both parameters I have to calculate a similarity value between the competencies of a reference local authority in France: C1010 C1015 C1020 C1025 C1030 C1502 C1505 C1507 C1510 C1515 C1520 C1525 C1528 ...
https://stackoverflow.com/questions/79388032/udf-method-simstring-a-string-b-where-a-and-b-come-from-two-different-da
java, apache-spark
1,737,870,873
se_79384191
stackoverflow
DATA_ENGINEERING
Spark: asynchronously update the broadcast variable
Spark: asynchronously update the broadcast variable So, I want to update a broadcast variable, here a token, based on its lifespan. api_token = {"token": "initial_token"} broadcast_token = None keep_running = True async def renew_api_token(): """Simulates API token renewal asynchronously.""" global api_token,...
https://stackoverflow.com/questions/79384191/spark-asynchronously-update-the-broadcast-variable
multithreading, apache-spark, asynchronous, pyspark
1,737,718,317
se_30964920
stackoverflow
DATA_ENGINEERING
Spark: Trying to run spark-shell, but get 'cmd' is not recognized as an internal or
Spark: Trying to run spark-shell, but get 'cmd' is not recognized as an internal or I'm trying to install Spark on my Windows desktop. Everything should work fine, but I get an error "'cmd' is not recognized as an internal or external command... " I installed Scala, Java JDK and unzipped Spark tgz in C:\, but...
https://stackoverflow.com/questions/30964920/spark-trying-to-run-spark-shell-but-get-cmd-is-not-recognized-as-an-internal
apache-spark
1,434,892,558
se_77548197
stackoverflow
DATA_ENGINEERING
How can i speed up my data write process in s3 using pySpark
How can i speed up my data write process in s3 using pySpark I have to write parquet files containing 700 000 rows each in s3 using PySpark. I am writing a data frame in a parquet file and saving it in the S3 using overwrite method. For writing one data frame in one bucket, my code is taking 50 secs to complete, and I...
https://stackoverflow.com/questions/77548197/how-can-i-speed-up-my-data-write-process-in-s3-using-pyspark
scala, apache-spark, amazon-s3, pyspark, apache-spark-sql
1,700,921,756
se_77156805
stackoverflow
DATA_ENGINEERING
Wide and Narrow transformations in Spark
Wide and Narrow transformations in Spark I have a question : Wide and Narrow transformations python Spark, are found both in RDDs and Structured APIs, right ? I mean, I guess I got the difference between wide and narrow transformations. My point is, are they exclusive for one or the other python Spark API (whether it'...
https://stackoverflow.com/questions/77156805/wide-and-narrow-transformations-in-spark
python, apache-spark, pyspark, rdd
1,695,378,348
se_78202957
stackoverflow
DATA_ENGINEERING
How to point sbt to use locally installed protoc in my scala project
How to point sbt to use locally installed protoc in my scala project noob here with scala/sbt in general. Long-story short: a project written in scala was dumped on my head and i am having trouble getting it running locally. i am executing sbt runMain Project but it is throwing this error [info] welcome to sbt 1.8.2 (...
https://stackoverflow.com/questions/78202957/how-to-point-sbt-to-use-locally-installed-protoc-in-my-scala-project
scala, apache-spark, sbt, protoc
1,711,057,462
se_50551919
stackoverflow
DATA_ENGINEERING
Remove list elements in a dataframe in scala
Remove list elements in a dataframe in scala I am new to scala and struggling with these use case. How can I remove the elements part of a list from a column in a dataframe? I have a list of names and I need to remove the names if it is present in the dataframe. I have dataframe like utid|description 12342|my name is ...
https://stackoverflow.com/questions/50551919/remove-list-elements-in-a-dataframe-in-scala
scala, apache-spark, apache-spark-sql
1,527,422,475
se_50602256
stackoverflow
DATA_ENGINEERING
Not able to Explode and select in the same expression in spark scala
Not able to Explode and select in the same expression in spark scala Here is my schema: root |-- DataPartition: string (nullable = true) |-- TimeStamp: string (nullable = true) |-- TRFCoraxData_instrumentId: long (nullable = true) |-- TRFCoraxData_organizationId: long (nullable = true) |-- Dividends: array (nulla...
https://stackoverflow.com/questions/50602256/not-able-to-explode-and-select-in-the-same-expression-in-spark-scala
scala, apache-spark, apache-spark-sql
1,527,675,778
se_79128216
stackoverflow
DATA_ENGINEERING
How to connect to SPARK using SPARK Connect from a client computer
How to connect to SPARK using SPARK Connect from a client computer I have installed Spark on a PI using the following docker compose scripts. Everything runs fine however i am not able to connect to Spark from my laptop using pyspark and spark connect. It seems it cannot connect to the spark server somehow, I am not ...
https://stackoverflow.com/questions/79128216/how-to-connect-to-spark-using-spark-connect-from-a-client-computer
apache-spark
1,729,935,209
se_79371058
stackoverflow
DATA_ENGINEERING
Why Stream to Stream inner join doesn't require watermark mandatorily
Why Stream to Stream inner join doesn't require watermark mandatorily According to Spark Documentation of Spark Structured Streaming, if 2 tables are stream type, then inner join will work without any watermark however, left outer join requires watermark mandatorily. I don't understand why. If it is because of sta...
https://stackoverflow.com/questions/79371058/why-stream-to-stream-inner-join-doesnt-require-watermark-mandatorily
apache-spark, pyspark, spark-structured-streaming, spark-streaming-kafka
1,737,370,574
se_79383880
stackoverflow
DATA_ENGINEERING
Set field of java UDF instance in spark driver and use in executors
Set field of java UDF instance in spark driver and use in executors Is it possible to set field on the UDF instance in driver and use it by the executors when call() is invoked? public class SomeUDF implements UDF2<String, String, String> { private String val = "foo"; public void init(String st){ val ...
https://stackoverflow.com/questions/79383880/set-field-of-java-udf-instance-in-spark-driver-and-use-in-executors
java, apache-spark, user-defined-functions
1,737,711,939
se_79188217
stackoverflow
DATA_ENGINEERING
Can&#39;t connect/write stream from spark container to table in cassandra container
Can&#39;t connect/write stream from spark container to table in cassandra container I am composing these services in separate docker containers all on the same confluent network: broker: image: confluentinc/cp-server:7.4.0 hostname: broker container_name: broker depends_on: zookeeper: con...
https://stackoverflow.com/questions/79188217/cant-connect-write-stream-from-spark-container-to-table-in-cassandra-container
docker, apache-spark, cassandra, spark-cassandra-connector
1,731,579,074
se_62555652
stackoverflow
DATA_ENGINEERING
Fetching data from REST API to Spark Dataframe using Pyspark
Fetching data from REST API to Spark Dataframe using Pyspark i am building a datapipeline which consume data from RESTApi in json format and pushed to Spark Dataframe. Spark Version: 2.4.4 but getting error as df = SQLContext.jsonRDD(rdd) AttributeError: type object 'SQLContext' has no attribute 'jsonRDD' Code: from...
https://stackoverflow.com/questions/62555652/fetching-data-from-rest-api-to-spark-dataframe-using-pyspark
apache-spark, pyspark
1,593,003,607
se_79380760
stackoverflow
DATA_ENGINEERING
Count entries for all possible categories
Count entries for all possible categories I have data that looks like this id | id_2 | ... | label | -- | ----- | --- | ----- | 1 | x | ... | a | 1 | x | ... | a | 1 | x | ... | b | 1 | y | ... | a | 1 | z | ... | c | 1 | z | ... | b | 1 | z | ... | c | 2...
https://stackoverflow.com/questions/79380760/count-entries-for-all-possible-categories
apache-spark, pyspark
1,737,630,259
se_60817234
stackoverflow
DATA_ENGINEERING
Delta Lake without Databricks Runtime
Delta Lake without Databricks Runtime Can one use Delta Lake and not being dependent on Databricks Runtime? (I mean, is it possible to use delta-lake with hdfs and spark on prem only?) If no, could you elaborate why is that so from technical point of view?
https://stackoverflow.com/questions/60817234/delta-lake-without-databricks-runtime
apache-spark, hdfs, databricks, delta-lake
1,584,979,542
se_71750833
stackoverflow
DATA_ENGINEERING
Create column using Spark pandas_udf, with dynamic number of input columns
Create column using Spark pandas_udf, with dynamic number of input columns I have this df: df = spark.createDataFrame( [('row_a', 5.0, 0.0, 11.0), ('row_b', 3394.0, 0.0, 4543.0), ('row_c', 136111.0, 0.0, 219255.0), ('row_d', 0.0, 0.0, 0.0), ('row_e', 0.0, 0.0, 0.0), ('row_f', 42.0, 0.0, 54...
https://stackoverflow.com/questions/71750833/create-column-using-spark-pandas-udf-with-dynamic-number-of-input-columns
apache-spark, pyspark, apache-spark-sql, user-defined-functions, pyspark-pandas
1,649,157,550
se_79364491
stackoverflow
DATA_ENGINEERING
Unable to access .env file from SparkSubmit
Unable to access .env file from SparkSubmit I am using the SparkSubmitOperator on airflow to send a .env file to all nodes in the cluster using the files property. SparkSubmitOperator(task_id=“spark”, application=“…py”, files=“path/to/.env” ) When I use Sparkfile.get(“.env”), it give me the path where the env is uplo...
https://stackoverflow.com/questions/79364491/unable-to-access-env-file-from-sparksubmit
apache-spark, spark-submit
1,737,110,549
se_79369556
stackoverflow
DATA_ENGINEERING
Sorting a big HIVE table with sparksql, how to assign spark resource
Sorting a big HIVE table with sparksql, how to assign spark resource I have a HIVE table with 3 billion rows. Want to assign a sequence ID base on decending order of the "amount" column. Logic is like below: with table_of_3_billion_row(amount) as ( VALUES ( 10.01 ), ( 1.25 ), ( 9.35 ), ( 8.64 ), ( 2.87 ), ( 4.13 ), ...
https://stackoverflow.com/questions/79369556/sorting-a-big-hive-table-with-sparksql-how-to-assign-spark-resource
apache-spark, sorting, hive
1,737,312,340
se_79993858
stackoverflow
DATA_ENGINEERING
MWAA 2.11.0 - Testing locally
MWAA 2.11.0 - Testing locally I'm trying to test MWAA 2.11 version locally. I have cloned the repository, built image and containers up and running. The connections I added via UI and not being recognised by DAG. [2026-08-13, 15:16:54 UTC] {logging_mixin.py:190} INFO - Error type: AirflowNotFoundException [2026-08-13...
https://stackoverflow.com/questions/79993858/mwaa-2-11-0-testing-locally
airflow, mwaa
1,786,634,301
se_57188062
stackoverflow
DATA_ENGINEERING
Airflow tasks with different schedules in the same dag
Airflow tasks with different schedules in the same dag I would like to have some tasks running every day and others running every week inside the same DAG, is it possible or should I create a different DAG for different schedule tasks ? I have seen the solution of using ShortCircuitOperator or AirflowSkipException an...
https://stackoverflow.com/questions/57188062/airflow-tasks-with-different-schedules-in-the-same-dag
airflow
1,563,988,168
se_67777041
stackoverflow
DATA_ENGINEERING
Changing the auto-generated task names in dynamic tasks
Changing the auto-generated task names in dynamic tasks I'm trying to make a dynamic workflow but want to change the tasks names which airflow auto-generating it and assign to the tasks inside the list. I tried to access the context and manually change the taskid but this also not worked during the pipeline rendering ...
https://stackoverflow.com/questions/67777041/changing-the-auto-generated-task-names-in-dynamic-tasks
python, airflow
1,622,476,828
se_79982279
stackoverflow
DATA_ENGINEERING
Apache Airflow (2.10.3) - Airflow Scheduler crashes on XCom deserialization of custom str subclass
Apache Airflow (2.10.3) - Airflow Scheduler crashes on XCom deserialization of custom str subclass I'm encountering a critical issue with Apache Airflow XComs when using a custom class that inherits from str. A simplified version of my custom class: class MyString(str): def __init__(self, value): self.valu...
https://stackoverflow.com/questions/79982279/apache-airflow-2-10-3-airflow-scheduler-crashes-on-xcom-deserialization-of-c
python, airflow
1,784,561,066
se_42059393
stackoverflow
DATA_ENGINEERING
How to run a task if a previous one fails in Apache Airflow
How to run a task if a previous one fails in Apache Airflow I need to do the following: Check if a server is up, if so I check if the Spark cluster in that server is up, case it's down I try to start it up, case it's already up I move forward to run my Spark job. I though about creating a task to check if the Spark ...
https://stackoverflow.com/questions/42059393/how-to-run-a-task-if-a-previous-one-fails-in-apache-airflow
python, triggers, controls, airflow
1,486,346,134
se_79983563
stackoverflow
DATA_ENGINEERING
Why shouldn&#39;t Airflow&#39;s standalone mode be used for production purposes?
Why shouldn&#39;t Airflow&#39;s standalone mode be used for production purposes? The documentation for installing Apache Airflow mentions a standalone mode that can be used to "try Apache Airflow without all production complexity". pipx run apache-airflow standalone However, it also says: Note that the standalone mo...
https://stackoverflow.com/questions/79983563/why-shouldnt-airflows-standalone-mode-be-used-for-production-purposes
best-practices, airflow
1,784,643,109
se_44429487
stackoverflow
DATA_ENGINEERING
user unbound variable on docker run
user unbound variable on docker run While running docker image, I am receiving the following error: /entrypoint.sh: line 7: USER: unbound variable Code of entrypoint.sh. #!/bin/bash set -euo pipefail export SPARK_DIST_CLASSPATH=$(hadoop classpath) POSTGRES_TIMEOUT=60 echo "Running as: ${USER}" if [ "${USER}" != "r...
https://stackoverflow.com/questions/44429487/user-unbound-variable-on-docker-run
docker, docker-compose, airflow
1,496,907,504
se_79972288
stackoverflow
DATA_ENGINEERING
How to Insert datas from a dataframe into a database?
How to Insert datas from a dataframe into a database? I have a DAG with three tasks in my project. The three tasks call three function which are in differents files. I'm using the ELT/ETL process. Everything seems fine until the injection of the datas. I don't know why I can't insert it in my database. I checked that ...
https://stackoverflow.com/questions/79972288/how-to-insert-datas-from-a-dataframe-into-a-database
python, pandas, sqlalchemy, airflow
1,782,928,885
se_79960724
stackoverflow
DATA_ENGINEERING
Does the airflow-db-cleanup.py DAG need any import modifications when using SparkKubernetesOperator?
Does the airflow-db-cleanup.py DAG need any import modifications when using SparkKubernetesOperator? I need to set up a metadata cleanup DAG for our Airflow environment, which uses the SparkKubernetesOperator (from apache-airflow-providers-cncf-kubernetes) to run Spark jobs on Kubernetes. I'm planning to use this wide...
https://stackoverflow.com/questions/79960724/does-the-airflow-db-cleanup-py-dag-need-any-import-modifications-when-using-spar
apache-spark, airflow, kubernetes-operator
1,781,623,394
se_79956748
stackoverflow
DATA_ENGINEERING
Forked errors in a task
Forked errors in a task I just started using airflow to schedule data pulls from a few sources to save them to a postgresql database on my laptop for further processing. Everything was running relatively smoothly until I tried to add a task to my dag that sends data to a google sheet so the rest of my company can view...
https://stackoverflow.com/questions/79956748/forked-errors-in-a-task
airflow, pygsheets
1,781,205,663
se_72186232
stackoverflow
DATA_ENGINEERING
Airflow 2.1.0 - DAG &#39;XXXXXXXX&#39; not found in serialized_dag table
Airflow 2.1.0 - DAG &#39;XXXXXXXX&#39; not found in serialized_dag table We recently upgraded from Airflow 1.10.12 to Airflow 2.1.0 and are getting issues errors like this in the UI for each of our dags. We have upgraded the version from 1.10.12 to 1.10.15 and it was successful. Then from 1.10.15 we have upgraded to 2...
https://stackoverflow.com/questions/72186232/airflow-2-1-0-dag-xxxxxxxx-not-found-in-serialized-dag-table
airflow, airflow-scheduler, airflow-2.x, airflow-webserver
1,652,185,291
se_74642215
stackoverflow
DATA_ENGINEERING
Airflow SLA on DAG level
Airflow SLA on DAG level Do you know the solution how to implement SLA on DAG level? I mean, the SLA within the whole DAG needs to be marked as success. Adding SLA parameter to default_args does not help here, because despite the fact this is a global parameter, it is evaluated on task level. # Default settings applie...
https://stackoverflow.com/questions/74642215/airflow-sla-on-dag-level
airflow
1,669,899,362
se_50790965
stackoverflow
DATA_ENGINEERING
Airflow BashOperator OSError: [Errno 2] No such file or directory
Airflow BashOperator OSError: [Errno 2] No such file or directory I keep getting the same error from a scheduled BashOperator that is currently back-filling (it's over a month "behind"). [2018-06-10 22:06:33,558] {base_task_runner.py:115} INFO - Running: ['bash', '-c', u'airflow run dag_name task_name 2018-03-14T00:...
https://stackoverflow.com/questions/50790965/airflow-bashoperator-oserror-errno-2-no-such-file-or-directory
python, permissions, airflow, airflow-scheduler
1,528,694,825
se_69713244
stackoverflow
DATA_ENGINEERING
Airflow Add Google Cloud Connection
Airflow Add Google Cloud Connection I'm finding the documentation here: https://airflow.apache.org/docs/apache-airflow-providers-google/stable/connections/gcp.html to be about as clear as mud and would be very grateful for some clarifications, please. I am simply trying to create a connection to my gcp project from my...
https://stackoverflow.com/questions/69713244/airflow-add-google-cloud-connection
google-cloud-platform, airflow
1,635,187,592
se_79933474
stackoverflow
DATA_ENGINEERING
Airflow use cases for different repos
Airflow use cases for different repos I am newbie in Airflow and I use currently task scheduler on remote desktop to automate our tasks but it is based on my credentials and I cannot share with other team members, so I clone all projects git repo into remote desktop and put path for task scheduler, but I want to move ...
https://stackoverflow.com/questions/79933474/airflow-use-cases-for-different-repos
python, r, airflow
1,777,446,554
se_72683391
stackoverflow
DATA_ENGINEERING
Airflow DAG error &quot;command failed. The command returned a non-zero exit code in airflow&quot;
Airflow DAG error &quot;command failed. The command returned a non-zero exit code in airflow&quot; I am new to airflow; There is an error while scheduling a talend job in airflow. The error is command failed. The command returned a non-zero exit code in airflow. So please help me if anyone has any answer or related to...
https://stackoverflow.com/questions/72683391/airflow-dag-error-command-failed-the-command-returned-a-non-zero-exit-code-in
airflow, talend
1,655,708,929
se_79931555
stackoverflow
DATA_ENGINEERING
Conditionally running tasks in Airflow
Conditionally running tasks in Airflow I'm trying to write a DAG that conditionally executes another task. The simplified version of what I'm working with is this: to_be_triggered = EmptyOperator(task_id="to_be_triggered") @task.branch() def trigger_dag(**kwargs): config = kwargs.get("dag_run_config") if config....
https://stackoverflow.com/questions/79931555/conditionally-running-tasks-in-airflow
python, airflow
1,777,065,546
se_78457889
stackoverflow
DATA_ENGINEERING
How can I find if another DAG is currently running and what configs were passed to it
How can I find if another DAG is currently running and what configs were passed to it I'm using airflow 1.10.12 I have DAG A and DAG B. DAG A runs every 12 hours and DAG B is only triggered manually with a configuration JSON. I know how to access the configuration JSON in DAG B, but is there a way to tell from DAG A i...
https://stackoverflow.com/questions/78457889/how-can-i-find-if-another-dag-is-currently-running-and-what-configs-were-passed
python, airflow
1,715,312,538
se_79929754
stackoverflow
DATA_ENGINEERING
How do you add GCP billing report labels onto Airflow&#39;s BatchPredictionJobHook.create_batch_prediction_job()?
How do you add GCP billing report labels onto Airflow&#39;s BatchPredictionJobHook.create_batch_prediction_job()? According to the official Airflow documentation we can use labels arg to mark certain batch predictions which we can use in GCP Billing > Report to filter by the labels. I tried it like this ... hook = Bat...
https://stackoverflow.com/questions/79929754/how-do-you-add-gcp-billing-report-labels-onto-airflows-batchpredictionjobhook-c
python, airflow, directed-acyclic-graphs, google-cloud-vertex-ai
1,776,809,381
se_79922553
stackoverflow
DATA_ENGINEERING
OSError when running containerized task in `airflow` image
OSError when running containerized task in `airflow` image I'm trying to run a simple task in the apache/airflow image with the following Python script: from airflow.sdk import dag, task @task.docker( image="docker.1ms.run/apache/airflow:3.2.0-python3.11" # Note. It is just a mirror of apache/airflow:3.2.0-py...
https://stackoverflow.com/questions/79922553/oserror-when-running-containerized-task-in-airflow-image
docker, airflow, airflow-taskflow
1,775,710,004
se_79921287
stackoverflow
DATA_ENGINEERING
Why does a DAG created in /dags take time to appear in the UI?
Why does a DAG created in /dags take time to appear in the UI? In Apache Airflow, when a new DAG file is created in the /dags directory, it doesn't show up immediately in the Airflow UI. There is some delay before the DAG becomes visible and accessible. Why does this happen? How can we make it appear faster? What is t...
https://stackoverflow.com/questions/79921287/why-does-a-dag-created-in-dags-take-time-to-appear-in-the-ui
airflow
1,775,539,864
se_79919190
stackoverflow
DATA_ENGINEERING
How to automatically install latest Python package versions in AWS MWAA from S3 requirements.txt without manual updates?
How to automatically install latest Python package versions in AWS MWAA from S3 requirements.txt without manual updates? Body: I am using AWS Managed Workflows for Apache Airflow (MWAA) where the requirements.txt file is stored in an S3 bucket and MWAA syncs it during environment updates. Current Setup: requirements....
https://stackoverflow.com/questions/79919190/how-to-automatically-install-latest-python-package-versions-in-aws-mwaa-from-s3
airflow, mwaa, aws-airflow-mwaa
1,775,149,311
se_76793296
stackoverflow
DATA_ENGINEERING
in Airflow, how to set logging level for the airflow-scheduler component?
in Airflow, how to set logging level for the airflow-scheduler component? I am running Airflow 2.5.2 in a docker image. When I run it, the airflow-scheduler module spews out a huge amount of DEBUG messages to the console. I'm trying to view the console to fix a different issue, and this stuff from airflow-scheduler i...
https://stackoverflow.com/questions/76793296/in-airflow-how-to-set-logging-level-for-the-airflow-scheduler-component
airflow
1,690,629,229
se_79427713
stackoverflow
DATA_ENGINEERING
Trigger a task iff direct upstream failed
Trigger a task iff direct upstream failed Let's say I have a dag with multiple tasks task1 >> task2 >> [task3, task4] I want task1 to be executed at the beginning. Then task2. If task2 ends with success, then execute task3, else execute task4. I've tried to set the TriggerRule all_failed to task4 and, if task2 fails/...
https://stackoverflow.com/questions/79427713/trigger-a-task-iff-direct-upstream-failed
airflow
1,739,205,329
se_79912836
stackoverflow
DATA_ENGINEERING
KubernetesPodOperator with deferrable=True returns Forbidden on Cloud Composer 3
KubernetesPodOperator with deferrable=True returns Forbidden on Cloud Composer 3 Environment: Cloud Composer 3 (composer-3-airflow-2.10.2-build.13) Region: europe-west1 Environment name: composer3-npd Project: XXXXXXXXXX Private environment: enabled Problem: When using KubernetesPodOperator with deferrable=True...
https://stackoverflow.com/questions/79912836/kubernetespodoperator-with-deferrable-true-returns-forbidden-on-cloud-composer-3
airflow, gcloud, google-cloud-composer
1,774,274,176
se_79892224
stackoverflow
DATA_ENGINEERING
Airflow Task dies exactly 24h after starting
Airflow Task dies exactly 24h after starting The Problem: when a task duration reaches 24h it is immediately killed. The log message we get indicates token expiration. System infos Airflow 3.1.6 (running in docker) Celery executor (worker_concurrency=16, worker_autoscale="2,32") auth_manager = airflow.providers.fab.a...
https://stackoverflow.com/questions/79892224/airflow-task-dies-exactly-24h-after-starting
airflow, celery
1,771,504,463
se_79890126
stackoverflow
DATA_ENGINEERING
Python Multiprocessing isn&#39;t working anymore after changing from Airflow 2 to Airflow 3
Python Multiprocessing isn&#39;t working anymore after changing from Airflow 2 to Airflow 3 I am currently migrating my processes and DAGs from Airflow 2 to Airflow 3. In doing so, I am encountering the problem that the DAG that executes an XML parser freezes after completing its work. As a result, this Task always re...
https://stackoverflow.com/questions/79890126/python-multiprocessing-isnt-working-anymore-after-changing-from-airflow-2-to-ai
python, migration, airflow
1,771,233,502
se_72304622
stackoverflow
DATA_ENGINEERING
How to send an email in AWS MWAA (Apache Airflow) using EmailOperator
How to send an email in AWS MWAA (Apache Airflow) using EmailOperator I am working with AWS MWAA (Apache Airflow). I want to send an email in MWAA upon completion of my pipeline.I have set the following configuration Now when I run my dag using an Email Operator, it gives me an error. File "/usr/lib64/python3.7/soc...
https://stackoverflow.com/questions/72304622/how-to-send-an-email-in-aws-mwaa-apache-airflow-using-emailoperator
amazon-web-services, airflow, mwaa
1,652,963,591