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_79490138
stackoverflow
DATA_ENGINEERING
Warning - In sprintf(versions$pattern, version$spark, version$hadoop) : 2 arguments not used by format 'spark-3.5.5-bin-hadoop3'
Warning - In sprintf(versions$pattern, version$spark, version$hadoop) : 2 arguments not used by format 'spark-3.5.5-bin-hadoop3' We've installed the latest versions of R (4.4.3) and Posit Rstudio (2024.12.1-563) and when we do the spark connection sends the next warning: *In sprintf(versions$pattern, version$s...
https://stackoverflow.com/questions/79490138/warning-in-sprintfversionspattern-versionspark-versionhadoop-2-argume
r, apache-spark
1,741,280,565
se_79489078
stackoverflow
DATA_ENGINEERING
No space error while running Spark from Airflow
No space error while running Spark from Airflow I am running the following code in Airflow from MWAA. The input data is approximately 400 GB in size I am running the code in environment class mw1.large. Up to 1000 DAG capacity 20 concurrent tasks (by default) Components: Web servers: 2 vCPU 4GB RAM each Workers: 4 vCP...
https://stackoverflow.com/questions/79489078/no-space-error-while-running-spark-from-airflow
python, amazon-web-services, apache-spark, pyspark, airflow
1,741,258,278
se_79476798
stackoverflow
DATA_ENGINEERING
Spark Structured Streaming, empty result for a stream-stream inner join to compute rolling averages
Spark Structured Streaming, empty result for a stream-stream inner join to compute rolling averages I've been trying to use Spark Structured Streaming for a hypothetical data streaming question against a non-commercial IMDB dataset. The original raw data: https://datasets.imdbws.com/ The original schema: https://zindi...
https://stackoverflow.com/questions/79476798/spark-structured-streaming-empty-result-for-a-stream-stream-inner-join-to-compu
python, apache-spark
1,740,780,749
se_67524252
stackoverflow
DATA_ENGINEERING
Failed to read part of the files from s3 bucket with Spark
Failed to read part of the files from s3 bucket with Spark I have a Spark 2.4.7 running on GCP Dataproc and task to read some files from AWS S3. Having AWS credentials, namely access key and secret access key, appended to files /etc/profile.d/spark_config.sh /etc/*bashrc /usr/lib/spark/conf/spark-env.sh at cluster cre...
https://stackoverflow.com/questions/67524252/failed-to-read-part-of-the-files-from-s3-bucket-with-spark
amazon-web-services, apache-spark, hadoop, amazon-s3, google-cloud-dataproc
1,620,930,078
se_79478713
stackoverflow
DATA_ENGINEERING
Disable inferSchema for JDBC connections
Disable inferSchema for JDBC connections I have an Azure SQL database that I want to query with PySpark. I have to "copy" the data to a temporary table, and then query this temporary table. I would like to use pretty much the same code that's in Spark's documentation for the prepareQuery option https://spark.apache.or...
https://stackoverflow.com/questions/79478713/disable-inferschema-for-jdbc-connections
java, apache-spark, jdbc
1,740,898,153
se_79115242
stackoverflow
DATA_ENGINEERING
OOM in spark 3.5.x with bucketing in Apache iceberg
OOM in spark 3.5.x with bucketing in Apache iceberg Getting OOM errors on Spark with iceberg. Looks like bucketing leads to unnecessary shuffling and kill the JVM with OOM. The data is evenly distributed no skewness here. spark.sql( """ |CREATE TABLE IF NOT EXISTS rest.db.customers ( | customer_id INT, ...
https://stackoverflow.com/questions/79115242/oom-in-spark-3-5-x-with-bucketing-in-apache-iceberg
apache-spark, apache-iceberg
1,729,618,913
se_79481839
stackoverflow
DATA_ENGINEERING
Databricks: Generate Multiple Excels for SQL Query
Databricks: Generate Multiple Excels for SQL Query I am getting "OSError: Errno 95: Operation not supported for the code below. I have 'openpyxl 3.1.5' installed on the cluster and have imported all required modules. I am sure this is something small, but I can't put my finger on it why this is erroring out. Thanks fo...
https://stackoverflow.com/questions/79481839/databricks-generate-multiple-excels-for-sql-query
apache-spark, pyspark, databricks
1,741,026,440
se_68956623
stackoverflow
DATA_ENGINEERING
How apply a different timezone to a timestamp in PySpark
How apply a different timezone to a timestamp in PySpark I am working with Pyspark and my input data contain a timestamp column (that contains timezone info) like that 2012-11-20T17:39:37Z I want to create the America/New_York representation of this timestamp. My understanding is that the best tool for that is from_u...
https://stackoverflow.com/questions/68956623/how-apply-a-different-timezone-to-a-timestamp-in-pyspark
apache-spark, datetime, pyspark, apache-spark-sql
1,630,081,276
se_79479546
stackoverflow
DATA_ENGINEERING
Distributed REST API Calls using SPARK with maintaining consistency
Distributed REST API Calls using SPARK with maintaining consistency I have a Spark DataFrame created from a Delta table, with one column of type STRUCT(JSON). For each row in this DataFrame, I need to make a REST API call using the JSON payload in the column. Additionally, consistency is important—if the Spark job fai...
https://stackoverflow.com/questions/79479546/distributed-rest-api-calls-using-spark-with-maintaining-consistency
apache-spark, distributed-computing
1,740,940,931
se_79479576
stackoverflow
DATA_ENGINEERING
Py4JJavaError : An error occurred while calling o745.save.\n: org.apache.spark.SparkException
Py4JJavaError : An error occurred while calling o745.save.\n: org.apache.spark.SparkException I've just started working with Spark, I've built and trained the model, I'm having trouble saving it. from pyspark.ml.regression import GBTRegressor gbt = GBTRegressor(featuresCol="features", labelCol="total_amount", maxIter=...
https://stackoverflow.com/questions/79479576/py4jjavaerror-an-error-occurred-while-calling-o745-save-n-org-apache-spark-s
apache-spark, pyspark
1,740,941,961
se_69072694
stackoverflow
DATA_ENGINEERING
Databricks Community Edition Cluster won't start
Databricks Community Edition Cluster won't start I am trying to start a cluster that was terminated in a Community Edition. However, whenever I click on 'start' the cluster won't start. It would appear I have to create a new cluster everytime I want to work with Databrick clusters. Can someone confirm that is the ...
https://stackoverflow.com/questions/69072694/databricks-community-edition-cluster-wont-start
apache-spark, databricks
1,630,922,579
se_79092855
stackoverflow
DATA_ENGINEERING
Caused by: java.lang.IllegalStateException: This connector was made for Scala null, it was not meant to run on Scala 2.12
Caused by: java.lang.IllegalStateException: This connector was made for Scala null, it was not meant to run on Scala 2.12 The pointed error code as follow String strJsonContent = SessionContext .getSparkSession() .read() .json(filePath) .toJSON() .first(); And I'm using Maven to build the package without de...
https://stackoverflow.com/questions/79092855/caused-by-java-lang-illegalstateexception-this-connector-was-made-for-scala-nu
scala, apache-spark, google-cloud-platform, google-cloud-dataproc
1,729,062,842
se_75358407
stackoverflow
DATA_ENGINEERING
Join two PySpark DataFrames and get some of the columns from one DataFrame when column names are similar
Join two PySpark DataFrames and get some of the columns from one DataFrame when column names are similar I want to join 2 PySpark DataFrames. But, I want all columns from one DataFrame, and some of columns from the 2nd DataFrame. The point is that there is a column with similar name in both DataFrames. Sample DataFram...
https://stackoverflow.com/questions/75358407/join-two-pyspark-dataframes-and-get-some-of-the-columns-from-one-dataframe-when
dataframe, apache-spark, join, pyspark
1,675,668,306
se_78920653
stackoverflow
DATA_ENGINEERING
partitionOverwriteMode dynamic and "logical" partitions
partitionOverwriteMode dynamic and "logical" partitions Can dynamic partitionOverwriteMode selectively overwrite parquet files that are not separated into Hive-style partitions (i.e. different directories)? Using row group filtering in parquet, it is possible to selectively ignore parquet files for I/O that ...
https://stackoverflow.com/questions/78920653/partitionoverwritemode-dynamic-and-logical-partitions
apache-spark, pyspark, parquet
1,724,790,820
se_79476682
stackoverflow
DATA_ENGINEERING
Allocation of Executors in Callee/Caller Spark Notebooks
Allocation of Executors in Callee/Caller Spark Notebooks I am working in Azure Synapse analytics and have a wrapper notebook calling two other notebooks, so am running something like: mssparkutils.notebook.run('/notebook_1_path', 3600) mssparkutils.notebook.run('/notebook_2_path', 3600) How does spark allocate executo...
https://stackoverflow.com/questions/79476682/allocation-of-executors-in-callee-caller-spark-notebooks
apache-spark, pyspark, azure-synapse
1,740,776,413
se_40603202
stackoverflow
DATA_ENGINEERING
What is the difference between sort and orderBy functions in Spark
What is the difference between sort and orderBy functions in Spark What is the difference between sort and orderBy spark DataFrame? scala> zips.printSchema root |-- _id: string (nullable = true) |-- city: string (nullable = true) |-- loc: array (nullable = true) | |-- element: double (containsNull = true) |--...
https://stackoverflow.com/questions/40603202/what-is-the-difference-between-sort-and-orderby-functions-in-spark
apache-spark, apache-spark-sql
1,479,190,426
se_77713672
stackoverflow
DATA_ENGINEERING
Dataflow Scio : Can't get the string result in the local language
Dataflow Scio : Can't get the string result in the local language I'm new to Dataflow, Scala and Apache Beam. I have created the dataflow to read the result from a text file and need to pass the value to the decryption function. My issue is that when I get the result from the decryption function it doesn't show th...
https://stackoverflow.com/questions/77713672/dataflow-scio-cant-get-the-string-result-in-the-local-language
java, scala, apache-spark, google-cloud-dataflow, spotify-scio
1,703,507,711
se_79472457
stackoverflow
DATA_ENGINEERING
bulk insert to clickhouse using spark
bulk insert to clickhouse using spark I'm trying to insert data to clickhouse using spark, but facing various errors like transport 500 error, too many parts error etc. Mean a while, I also used python and it worked well without any error. It seems that spark with clickhouse-jdbc is not proper to insert large data to ...
https://stackoverflow.com/questions/79472457/bulk-insert-to-clickhouse-using-spark
apache-spark, clickhouse
1,740,654,317
se_78929791
stackoverflow
DATA_ENGINEERING
How do I access the fields within a VARIANT column while reading from Kafka using Spark?
How do I access the fields within a VARIANT column while reading from Kafka using Spark? I get a nice structure if I do not try to get to nested fields. I am reading from Kafka and writing to a table. The issue happens on the readStream. I get [INVALID_EXTRACT_BASE_FIELD_TYPE] Can't extract a value from "data". Need a...
https://stackoverflow.com/questions/78929791/how-do-i-access-the-fields-within-a-variant-column-while-reading-from-kafka-usin
apache-spark, pyspark, apache-kafka, databricks
1,724,969,632
se_79454330
stackoverflow
DATA_ENGINEERING
How to intercept Spark SQL queries
How to intercept Spark SQL queries I am working on modifying the Apache Spark source code to capture SQL queries executed using spark.sql() at runtime, modify them (if needed), and then execute the modified SQL. Requirements: The SQL query should be captured at runtime (not from logs, lineage, or physical/logical pla...
https://stackoverflow.com/questions/79454330/how-to-intercept-spark-sql-queries
apache-spark, apache-spark-sql
1,740,050,722
se_74967205
stackoverflow
DATA_ENGINEERING
Spark Physical Plan: meaning of number of input batches in ColumnarToRow operator
Spark Physical Plan: meaning of number of input batches in ColumnarToRow operator I'm looking at a physical plan generated by running Spark query. The query reads a parquet file and does some aggregation. In the physical plan, there is an operator called ColumnarToRow, and it has a statistics called "number of input b...
https://stackoverflow.com/questions/74967205/spark-physical-plan-meaning-of-number-of-input-batches-in-columnartorow-operato
apache-spark, pyspark, apache-spark-sql
1,672,454,126
se_79439928
stackoverflow
DATA_ENGINEERING
<class 'TypeError'>: Object of type 'DataFrame' is not JSON serializable
<class 'TypeError'>: Object of type 'DataFrame' is not JSON serializable I have a dataframe with 3 columns : date, week and yearweek. I want to extract the first and the last day of the week. Here is my dataset : +----------+-------+------------+ | date| week| yearweek| +----------+----...
https://stackoverflow.com/questions/79439928/class-typeerror-object-of-type-dataframe-is-not-json-serializable
python, apache-spark, pyspark
1,739,548,951
se_79444932
stackoverflow
DATA_ENGINEERING
Error on saving pyspark dataframe to parquet
Error on saving pyspark dataframe to parquet Im running into error while trying to save pyspark data frame into parquet file. The directory is located on the external volume attached to the workspace I'm working on, and spark creates empty folder test_2.parquet itself but then throws the error. Im running spark locall...
https://stackoverflow.com/questions/79444932/error-on-saving-pyspark-dataframe-to-parquet
python, apache-spark, pyspark, apache-spark-sql
1,739,784,053
se_33734210
stackoverflow
DATA_ENGINEERING
system cannot find the path specified in spark-shell
system cannot find the path specified in spark-shell I am trying to install Spark in Win7 and am getting an error. These are my environment settings: SPARK_HOME : C:\spark (this is where I have unzipped the spark files) JAVA_HOME : C:\Program Files\Java\jdk1.7.0_71; SCALA_HOME: C:\Program Files (x86)\scala ...
https://stackoverflow.com/questions/33734210/system-cannot-find-the-path-specified-in-spark-shell
apache-spark
1,447,673,063
se_68449308
stackoverflow
DATA_ENGINEERING
How can I turn off rounding in Spark?
How can I turn off rounding in Spark? I have a dataframe and I'm doing this: df = dataframe.withColumn("test", lit(0.4219759403)) I want to get just the first four numbers after the dot, without rounding. When I cast to DecimalType, with .cast(DataTypes.createDecimalType(20,4) or even with round function, this number...
https://stackoverflow.com/questions/68449308/how-can-i-turn-off-rounding-in-spark
python, dataframe, apache-spark, pyspark, rounding
1,626,752,631
se_79469293
stackoverflow
DATA_ENGINEERING
What's the difference between loading a dataset into PySpark and filtering it within the SQL query and filtering it with PySparks filter function?
What's the difference between loading a dataset into PySpark and filtering it within the SQL query and filtering it with PySparks filter function? Could someone explain what is faster - loading a table with an SQL query and filtering it within the table or loading the full table and filtering it outside with PySpa...
https://stackoverflow.com/questions/79469293/whats-the-difference-between-loading-a-dataset-into-pyspark-and-filtering-it-wi
sql, apache-spark, pyspark, cloudera
1,740,564,239
se_79469978
stackoverflow
DATA_ENGINEERING
Keep getting "ConnectionRefused" or "OOM" errors when working with PySpark in Cloudera Machine Learning
Keep getting "ConnectionRefused" or "OOM" errors when working with PySpark in Cloudera Machine Learning I'm setting up a CML session with 64GB of RAM and 4 CPUs, then I set up a PySpark session with these configurations spark = SparkSession.builder \ .appName("OptimizedSparkSession") \ .mas...
https://stackoverflow.com/questions/79469978/keep-getting-connectionrefused-or-oom-errors-when-working-with-pyspark-in-cl
apache-spark, pyspark, hive, cloudera, impala
1,740,577,832
se_79470120
stackoverflow
DATA_ENGINEERING
How to override txnVersion in Spark?
How to override txnVersion in Spark? Following the instructions for idempotency in Idempotent table writes in foreachBatch, I set the txnVersion and txnApp options. It works as intended. However, those options keep their values even after foreachBatch ends. How to override txnVersion and txnApp after foreachBatch ends...
https://stackoverflow.com/questions/79470120/how-to-override-txnversion-in-spark
python, scala, apache-spark, databricks, delta
1,740,581,038
se_79467626
stackoverflow
DATA_ENGINEERING
Apache Spark - Extracting Source File Creation/Modification Timestamp
Apache Spark - Extracting Source File Creation/Modification Timestamp I have a Spark Streaming job which reads data from file sources like Amazon S3 or OCI Object Storage and writes data into delta table. I have a requirement where I need to compute the time difference between the time file was added/modified in Amazo...
https://stackoverflow.com/questions/79467626/apache-spark-extracting-source-file-creation-modification-timestamp
apache-spark, amazon-s3, spark-structured-streaming, delta-lake, oracle-cloud-infrastructure
1,740,510,010
se_47491350
stackoverflow
DATA_ENGINEERING
Maven build with jenkins for scala spark program : "No primary artifact to install, installing attached artifacts instead
Maven build with jenkins for scala spark program : "No primary artifact to install, installing attached artifacts instead I have a project with multiple scala spark programs, while I run mvn install through eclipse I am able to get the correct jar generated which is used with spark-submit command to run. After pu...
https://stackoverflow.com/questions/47491350/maven-build-with-jenkins-for-scala-spark-program-no-primary-artifact-to-insta
scala, maven, apache-spark, jenkins, jenkins-pipeline
1,511,650,854
se_79466071
stackoverflow
DATA_ENGINEERING
How to efficiently join two directories that are already partitioned
How to efficiently join two directories that are already partitioned Suppose I have two different data sets A and B, and they are both already partitioned by joinKey and laid out in the filesystem like A/joinKey/<files> and B/joinKey<files> in the filesystem. For example, let's say joinKey is some hash value. Then, th...
https://stackoverflow.com/questions/79466071/how-to-efficiently-join-two-directories-that-are-already-partitioned
apache-spark, pyspark, apache-spark-sql
1,740,476,827
se_79467163
stackoverflow
DATA_ENGINEERING
Pyspark find columns with mismatched data
Pyspark find columns with mismatched data I have a Pyspark dataframe df1. It has columns like col1, col2, col3, col4, col5. +----+----+----+----+----+ |col1|col2|col3|col4|col5| +----+----+----+----+----+ |A |A |X |Y |Y | |B |C |Y |Y |Z | |D |D |Z |X |Z | |E |E |M |M |A | +----+...
https://stackoverflow.com/questions/79467163/pyspark-find-columns-with-mismatched-data
python, apache-spark, pyspark, apache-spark-sql
1,740,499,580
se_79468254
stackoverflow
DATA_ENGINEERING
Can&#39;t load saved transformer object when implementing custom Transformer using Spark MLLib
Can&#39;t load saved transformer object when implementing custom Transformer using Spark MLLib I am getting error to load saved custom Transformer object in Spark. Even getting the same error with the example code from https://github.com/apache/spark/blob/4f5ee806597c76e2beea401006fb5a276d7227b1/examples/src/main/scal...
https://stackoverflow.com/questions/79468254/cant-load-saved-transformer-object-when-implementing-custom-transformer-using-s
scala, apache-spark, apache-spark-mllib
1,740,531,459
se_38493570
stackoverflow
DATA_ENGINEERING
&#39;SparkSession&#39; object has no attribute &#39;sparkContext&#39;
&#39;SparkSession&#39; object has no attribute &#39;sparkContext&#39; I have Spark 2.0.0 and I am trying to run some Python examples from Spark source code. This is the example. And I was running like: spark-submit pi.py 2 But I kept getting the following error: Traceback (most recent call last): File "/home/do...
https://stackoverflow.com/questions/38493570/sparksession-object-has-no-attribute-sparkcontext
python, apache-spark, pyspark
1,469,065,769
se_79436230
stackoverflow
DATA_ENGINEERING
Spark Jupyter interaction
Spark Jupyter interaction How can we connect Jupiter notebook with spark operator as interactive session where executor are created and execute jupyter notebook job and get done and got terminated in an EKS environment. I try GitHub native spark and Google spark operator how ever executor are unable to start it get te...
https://stackoverflow.com/questions/79436230/spark-jupyter-interaction
apache-spark, jupyter
1,739,450,917
se_79466596
stackoverflow
DATA_ENGINEERING
Whether repartition() will always shuffle even before an action is triggered
Whether repartition() will always shuffle even before an action is triggered I read that repartition() will be lazily evaluated as it is a transformation, and transformations are only triggered on actions. However, I imagine that all the data must be loaded by Spark first before any repartitioning can be done based on...
https://stackoverflow.com/questions/79466596/whether-repartition-will-always-shuffle-even-before-an-action-is-triggered
apache-spark, pyspark, apache-spark-sql
1,740,487,464
se_40577546
stackoverflow
DATA_ENGINEERING
How to save RDD data into json files, not folders
How to save RDD data into json files, not folders I am receiving the streaming data myDStream (DStream[String]) that I want to save in S3 (basically, for this question, it doesn't matter where exactly do I want to save the outputs, but I am mentioning it just in case). The following code works well, but it saves fol...
https://stackoverflow.com/questions/40577546/how-to-save-rdd-data-into-json-files-not-folders
scala, apache-spark, spark-streaming
1,479,063,197
se_79454264
stackoverflow
DATA_ENGINEERING
Does Spark exceptAll() requires both dataframe columns to be in same order?
Does Spark exceptAll() requires both dataframe columns to be in same order? I have wasted a considerable amount of time trying to make exceptAll() pyspark function, and as far as I understood it was failing (not recognizing existing on target table) due to the fact that both dataframes column order was slightly differ...
https://stackoverflow.com/questions/79454264/does-spark-exceptall-requires-both-dataframe-columns-to-be-in-same-order
apache-spark, pyspark, apache-spark-sql
1,740,049,443
se_79463598
stackoverflow
DATA_ENGINEERING
Create dockerfile to use airflow and spark, pip backtracking runtime issue comes out
Create dockerfile to use airflow and spark, pip backtracking runtime issue comes out I'm tring to build dockerfile to use airflow and spark as follows FROM apache/airflow:2.7.0-python3.9 ENV AIRFLOW_HOME=/opt/airflow USER root # Update the package list, install required packages, and clean up RUN apt-get update && ...
https://stackoverflow.com/questions/79463598/create-dockerfile-to-use-airflow-and-spark-pip-backtracking-runtime-issue-comes
python, docker, apache-spark, airflow, java-11
1,740,401,794
se_72133675
stackoverflow
DATA_ENGINEERING
Vertica data into pySpark throws &quot;Failed to find data source&quot;
Vertica data into pySpark throws &quot;Failed to find data source&quot; I have spark 3.2, vertica 9.2. spark = SparkSession.builder.appName("Ukraine").master("local[*]")\ .config("spark.jars", '/home/shivamanand/spark-3.2.1-bin-hadoop3.2/jars/vertica-jdbc-9.2.1-0.jar')\ .config("spark.jars", '/home/shivamanand/spark-3...
https://stackoverflow.com/questions/72133675/vertica-data-into-pyspark-throws-failed-to-find-data-source
python-3.x, maven, apache-spark, pyspark, vertica
1,651,784,867
se_77214686
stackoverflow
DATA_ENGINEERING
Using Java SparkSQL getting:java.lang.NoSuchMethodError: &#39;scala.collection.mutable.ArrayBuffer org.apache.spark.executor.TaskMetrics.externalAccums()&#39;
Using Java SparkSQL getting:java.lang.NoSuchMethodError: &#39;scala.collection.mutable.ArrayBuffer org.apache.spark.executor.TaskMetrics.externalAccums()&#39; I am learning Spark for Java, trying to perform a simple task with SparkSQL and getting this error, tried to look for the answer in the internet but without su...
https://stackoverflow.com/questions/77214686/using-java-sparksql-gettingjava-lang-nosuchmethoderror-scala-collection-mutab
java, maven, apache-spark
1,696,240,555
se_67065931
stackoverflow
DATA_ENGINEERING
How to run pyspark from host&#39;s vscode and connect to spark running on container
How to run pyspark from host&#39;s vscode and connect to spark running on container I have a spark cluster running via docker container. so far if I run any spark command inside the container it is fine and working. The problem is I want to run a pyspark application from the outside container, from the host, and be ab...
https://stackoverflow.com/questions/67065931/how-to-run-pyspark-from-hosts-vscode-and-connect-to-spark-running-on-container
docker, apache-spark, pyspark
1,618,262,985
se_79461762
stackoverflow
DATA_ENGINEERING
Running Spark Application on Docker Containers Through Intellij IDEA CE
Running Spark Application on Docker Containers Through Intellij IDEA CE I have: Apple Macbook Pro M4 with Silicon Chip Docker Desktop Installed Docker Resources settings - CPU limit: 12, Memory Limit: 15GB, Swap: 4GB I need: A multinode spark cluster running on my macbook 1 driver, 2 workers Be able to run spark sc...
https://stackoverflow.com/questions/79461762/running-spark-application-on-docker-containers-through-intellij-idea-ce
docker, scala, apache-spark, intellij-idea
1,740,335,084
se_79453103
stackoverflow
DATA_ENGINEERING
Optimizing Spark Joins: How to Perform Multiple Left Joins Without Additional Shuffling
Optimizing Spark Joins: How to Perform Multiple Left Joins Without Additional Shuffling Let's say I have a 2 DataFrames: First is tickets which has 3 columns: account_id assignee_id requester_id And I have a second DataFrame users with 3 columns: account_id id name I would like as an output a single DataFrame: ac...
https://stackoverflow.com/questions/79453103/optimizing-spark-joins-how-to-perform-multiple-left-joins-without-additional-sh
apache-spark, optimization, partitioning, denormalization
1,740,012,762
se_79456275
stackoverflow
DATA_ENGINEERING
Putty terminal not showing a clean view of DataFrame (Spark Scala)
Putty terminal not showing a clean view of DataFrame (Spark Scala) I am trying to get a better visualization of the df that I'm working with but the putty terminal/console is seemingly making this impossible. I tried messing around with the putty settings but everything seemed to be correct. I tried df.show(truncate =...
https://stackoverflow.com/questions/79456275/putty-terminal-not-showing-a-clean-view-of-dataframe-spark-scala
dataframe, scala, apache-spark, putty
1,740,107,093
se_79457046
stackoverflow
DATA_ENGINEERING
Local spark docker cannot connect to remote spark master docker
Local spark docker cannot connect to remote spark master docker I'm new to spark, so if there is any naive or duplicated problem, I apologize in advance. There are four bitnami dockers. One is build on local machine, and the resting are build on remote virtual machines with host 11.119.9.1,11.119.9.2,11.119.9.3 respec...
https://stackoverflow.com/questions/79457046/local-spark-docker-cannot-connect-to-remote-spark-master-docker
python, linux, docker, apache-spark, tcp
1,740,133,371
se_79454901
stackoverflow
DATA_ENGINEERING
Monotonically increasing id order
Monotonically increasing id order The spec of monotonically order id monotonically_increasing_id says The generated ID is guaranteed to be monotonically increasing and unique, but not consecutive. So I assume there is some ordering otherwise increasing has no meaning. So the question what does increasing mean? Or is...
https://stackoverflow.com/questions/79454901/monotonically-increasing-id-order
python, dataframe, apache-spark, pyspark, apache-spark-sql
1,740,062,994
se_77891487
stackoverflow
DATA_ENGINEERING
checksum error while writing data to delta table. Is there a way to fix this issue?
checksum error while writing data to delta table. Is there a way to fix this issue? When trying to insert data into delta table, getting below error as checksum number mismatch. Is there a way to fix this issue. Sark version : 3.4 (open source) Delta lake: 2.4 Total records in the table is 15602 Total delta table vers...
https://stackoverflow.com/questions/77891487/checksum-error-while-writing-data-to-delta-table-is-there-a-way-to-fix-this-iss
apache-spark, pyspark, delta-lake
1,706,364,867
se_79453775
stackoverflow
DATA_ENGINEERING
handling large tgz with pcap in pyspark - ValueError: can not serialize object larger than 2G
handling large tgz with pcap in pyspark - ValueError: can not serialize object larger than 2G I have a pyspark based pipeline that uses spark.read.format("binaryFile") to decompress tgz files and handle the pcap file inside (exploding to packages etc). The code that handles the tar, pcap, and single packets is written...
https://stackoverflow.com/questions/79453775/handling-large-tgz-with-pcap-in-pyspark-valueerror-can-not-serialize-object-l
python, apache-spark, pyspark
1,740,039,869
se_71639346
stackoverflow
DATA_ENGINEERING
Why does RDD work when I don&#39;t have the implicit encoder? Why does providing an implicit encoder also fix the issue?
Why does RDD work when I don&#39;t have the implicit encoder? Why does providing an implicit encoder also fix the issue? The Spark quickstart example provides some code to count the occurrences of each word that appears in the README.md document: val textFile = spark.read.textFile("README.md") textFile.flatMap(line =>...
https://stackoverflow.com/questions/71639346/why-does-rdd-work-when-i-dont-have-the-implicit-encoder-why-does-providing-an
apache-spark
1,648,407,072
se_74275532
stackoverflow
DATA_ENGINEERING
How do I specify a Maven repository for Gitlab in ivy-settings.xml?
How do I specify a Maven repository for Gitlab in ivy-settings.xml? I have no luck with Spark resolving Maven packages from our company Gitlab. My ivy-settings.xml looks like this: <ivysettings> <settings defaultResolver="default"/> <include url="${ivy.default.settings.dir}/ivysettings-public.xml"/> <include u...
https://stackoverflow.com/questions/74275532/how-do-i-specify-a-maven-repository-for-gitlab-in-ivy-settings-xml
apache-spark, gitlab, ivy
1,667,303,647
se_69297364
stackoverflow
DATA_ENGINEERING
kafka offset in spark
kafka offset in spark Kafka enable.auto.commit is set to false and Spark version is 2.4 If using latest offset, do we need to manually find last offset details and mention it in .CreateDirectStream() in Spark application? or will it automatically take latest offset? In any case do we need to find the last offset deta...
https://stackoverflow.com/questions/69297364/kafka-offset-in-spark
scala, apache-spark, apache-kafka
1,632,389,093
se_78809053
stackoverflow
DATA_ENGINEERING
Spark Large single Parquet file to Delta Failure with Spark SQL
Spark Large single Parquet file to Delta Failure with Spark SQL Cluster details spark 3.4 5 executors nodes with x16 cores and 112GB RAM Parquet file details provided via 3rd party source file in adls single 20GB .parquet file 68 million rows 1,599 columns 5034 row groups I'm trying to write out only a subset of t...
https://stackoverflow.com/questions/78809053/spark-large-single-parquet-file-to-delta-failure-with-spark-sql
apache-spark, apache-spark-sql, parquet, azure-synapse
1,722,287,309
se_62374126
stackoverflow
DATA_ENGINEERING
spark cassandra connector problem using catalogs
spark cassandra connector problem using catalogs I am following the instructions found here to connect my spark program to read data from Cassandra. Here is how I have configured spark: val configBuilder = SparkSession.builder .config("spark.sql.extensions", "com.datastax.spark.connector.CassandraSparkExtensions") ...
https://stackoverflow.com/questions/62374126/spark-cassandra-connector-problem-using-catalogs
apache-spark, cassandra, spark-cassandra-connector
1,592,146,221
se_19678959
stackoverflow
DATA_ENGINEERING
How to run twitter popular tags of Spark streaming using scala?
How to run twitter popular tags of Spark streaming using scala? I am new to Spark so please guide. There are lots of example available related to Spark streaming using Scala. You could check it out from https://github.com/apache/incubator-spark/tree/master/examples/src/main/scala/org/apache/spark/streaming/examples....
https://stackoverflow.com/questions/19678959/how-to-run-twitter-popular-tags-of-spark-streaming-using-scala
scala, twitter, streaming, apache-spark
1,383,126,773
se_73960391
stackoverflow
DATA_ENGINEERING
Get list of formats in Apache Spark (data sources)
Get list of formats in Apache Spark (data sources) We need to get the list of formats (read-write) for some config file validations. The formats I am talking about are: spark.read.format('this') spark.write.format('this') Is there a way to get it as a list? For example formats = spark.sql.utils.getFormats() print(fo...
https://stackoverflow.com/questions/73960391/get-list-of-formats-in-apache-spark-data-sources
python, apache-spark, validation, pyspark, apache-spark-sql
1,664,973,004
se_31812780
stackoverflow
DATA_ENGINEERING
Append a new column to an existing parquet file
Append a new column to an existing parquet file Is there any way to append a new column to an existing parquet file? I'm currently working on a kaggle competition, and I've converted all the data to parquet files. Here was the case, I read the parquet file into pyspark DataFrame, did some feature extraction and app...
https://stackoverflow.com/questions/31812780/append-a-new-column-to-an-existing-parquet-file
apache-spark, apache-spark-sql, parquet
1,438,700,505
se_79451116
stackoverflow
DATA_ENGINEERING
Photon query in databricks
Photon query in databricks I am running a MERGE query in Databricks on a Photon-enabled cluster, but I encountered the following error message: == Photon Explanation == Commands are not directly photonized. They must be run to determine if they can be Photon-ized. If this message appears on an executed command, please...
https://stackoverflow.com/questions/79451116/photon-query-in-databricks
apache-spark, databricks
1,739,963,351
se_79445800
stackoverflow
DATA_ENGINEERING
Spark on Docker Fails to Connect to AWS RDS PostgreSQL via Bastion
Spark on Docker Fails to Connect to AWS RDS PostgreSQL via Bastion I have an Apache Spark cluster running on a docker compose network, that needs to connect to an AWS RDS instance (postgreSQL more specifically), the following is the compose.yml file I am using to define the spark cluster: services: spark-master: ...
https://stackoverflow.com/questions/79445800/spark-on-docker-fails-to-connect-to-aws-rds-postgresql-via-bastion
postgresql, amazon-web-services, docker, apache-spark, docker-compose
1,739,804,525
se_79450752
stackoverflow
DATA_ENGINEERING
why two jobs are created for 1 action in pyspark?
why two jobs are created for 1 action in pyspark? Below is the data used in my csv file empid,empname,empsal,empdept,empblock 1,abc,2000,cse,A 2,def,1000,ece,C 3,ghi,8000,eee,D 4,jkl,4000,ece,B 5,mno,3000,itd,F 6,pqr,6000,mec,C 1)Running below statement would create one job in spark UI to determine the column names a...
https://stackoverflow.com/questions/79450752/why-two-jobs-are-created-for-1-action-in-pyspark
apache-spark, pyspark, apache-spark-sql
1,739,955,702
se_78339689
stackoverflow
DATA_ENGINEERING
Apache Spark getting janino compiler exception
Apache Spark getting janino compiler exception Spark codegen is failing to compile the code. I'm using Spark 3.3.2. Getting the below exception org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 109, Column 1: Cannot determine simple type name "com" at org.codehaus.janino.UnitCompiler.comp...
https://stackoverflow.com/questions/78339689/apache-spark-getting-janino-compiler-exception
java, apache-spark, apache-spark-sql, code-generation, janino
1,713,344,382
se_79448941
stackoverflow
DATA_ENGINEERING
Spark SQL creates Hive table but generates conflicting Thrift port preventing connection to Hive container
Spark SQL creates Hive table but generates conflicting Thrift port preventing connection to Hive container I’m building a data lakehouse using Docker, and I’m attempting to create a Hive table via Spark SQL. I initialize my Spark session with: from pyspark.sql import SparkSession from pyspark.sql.types import StructTy...
https://stackoverflow.com/questions/79448941/spark-sql-creates-hive-table-but-generates-conflicting-thrift-port-preventing-co
apache-spark, pyspark, hive
1,739,895,196
se_56382728
stackoverflow
DATA_ENGINEERING
How to use an existing column as index in Spark&#39;s Dataframe
How to use an existing column as index in Spark&#39;s Dataframe I am 'translating' a python code to pyspark. I would like to use an existing column as index for a dataframe. I did this in python using pandas. The small piece of code below explains what I did. Thanks for helping. df.set_index('colx',drop=False,inplace...
https://stackoverflow.com/questions/56382728/how-to-use-an-existing-column-as-index-in-sparks-dataframe
pandas, dataframe, apache-spark, pyspark, apache-spark-sql
1,559,236,390
se_67795276
stackoverflow
DATA_ENGINEERING
Spark SQL passing variables - Synapse (Spark pool)
Spark SQL passing variables - Synapse (Spark pool) I have following SparkSQL (Spark pool - Spark 3.0) code and I want to pass a variable to it. How can I do that? I tried the following: #cel 1 (Toggle parameter cell): %%pyspark stat = 'A' #cel2: select * from silver.employee_dim where Status= '$stat'
https://stackoverflow.com/questions/67795276/spark-sql-passing-variables-synapse-spark-pool
azure, apache-spark, parameters, apache-spark-sql, azure-synapse
1,622,577,356
se_35247168
stackoverflow
DATA_ENGINEERING
Spark SQL Row_number() PartitionBy Sort Desc
Spark SQL Row_number() PartitionBy Sort Desc I've successfully create a row_number() and partitionBy() by in Spark using Window, but would like to sort this by descending, instead of the default ascending. Here is my working code: from pyspark import HiveContext from pyspark.sql.types import * from pyspark.sql import...
https://stackoverflow.com/questions/35247168/spark-sql-row-number-partitionby-sort-desc
python, apache-spark, pyspark, apache-spark-sql, window-functions
1,454,797,045
se_50815710
stackoverflow
DATA_ENGINEERING
Spark transactional write operation using temporary directories
Spark transactional write operation using temporary directories According to this blog at databricks, spark relies on commit protocol classes from Hadoop so if job is not finished because of some failure output directory does not change(partial output files do not occurs). So my questions are ; Does spark prevent pa...
https://stackoverflow.com/questions/50815710/spark-transactional-write-operation-using-temporary-directories
apache-spark, amazon-s3, hdfs
1,528,801,772
se_49275878
stackoverflow
DATA_ENGINEERING
Pyspark Jupyter - dataframe created in java code vs python code
Pyspark Jupyter - dataframe created in java code vs python code I have a class in java that builds some sophisticated Spark DataFrame. package companyX; class DFBuilder { public DataFrame build() { ... return dataframe; } } I add this class to the pyspark/jupiter classpath so its callable by py...
https://stackoverflow.com/questions/49275878/pyspark-jupyter-dataframe-created-in-java-code-vs-python-code
apache-spark, pyspark, jupyter-notebook, py4j
1,521,024,926
se_42607591
stackoverflow
DATA_ENGINEERING
FileNotFoundException when trying to save DataFrame to parquet format, with &#39;overwrite&#39; mode
FileNotFoundException when trying to save DataFrame to parquet format, with &#39;overwrite&#39; mode I have this weird error. I have a routine that reads a dataframe if it exists (or creates one otherwise), modifies it, and then saves it again in the same target path in parquet format, with 'overwrite' mode. In the f...
https://stackoverflow.com/questions/42607591/filenotfoundexception-when-trying-to-save-dataframe-to-parquet-format-with-ove
apache-spark, pyspark, apache-spark-sql
1,488,711,959
se_51680587
stackoverflow
DATA_ENGINEERING
How can I account for AM/PM in string to DateTime conversion in pyspark?
How can I account for AM/PM in string to DateTime conversion in pyspark? My datetime is in following format: visit_dts |web_datetime| +--------------------+------------+ | 5/1/2018 3:48:14 PM| null| Based on answer provided here, I am using following query to convert string into datetime format: ...
https://stackoverflow.com/questions/51680587/how-can-i-account-for-am-pm-in-string-to-datetime-conversion-in-pyspark
apache-spark, datetime, pyspark, apache-spark-sql
1,533,333,809
se_79430796
stackoverflow
DATA_ENGINEERING
Spark reads more documents than Mongo collection actually returns
Spark reads more documents than Mongo collection actually returns I have a simple spark job which reads from a Mongo collection: SparkSession spark = SparkSession .builder() .appName("LuckyBetsFP") .config("spark.mongodb.read.connection.uri", "mongodb://localhost:27017/exercises.movie_logs") ...
https://stackoverflow.com/questions/79430796/spark-reads-more-documents-than-mongo-collection-actually-returns
mongodb, apache-spark, apache-spark-sql
1,739,293,734
se_67769492
stackoverflow
DATA_ENGINEERING
Scala module 2.12.3 requires Jackson Databind version &gt;= 2.12.0 and &lt; 2.13.0 but I have databind 2.12.3
Scala module 2.12.3 requires Jackson Databind version &gt;= 2.12.0 and &lt; 2.13.0 but I have databind 2.12.3 For a project, I'm using spark structured streaming with kafka. I have this conf : <spark.version>3.1.1</spark.version> <slf4j.version>1.7.7</slf4j.version> <log4j.version>1.2.17</log4j.version> <scala.version...
https://stackoverflow.com/questions/67769492/scala-module-2-12-3-requires-jackson-databind-version-2-12-0-and-2-13-0-but
java, apache-spark, data-binding, version
1,622,446,038
se_79442983
stackoverflow
DATA_ENGINEERING
How to do web scraping using pyspark
How to do web scraping using pyspark Hello I've a question how to do web scraping and read the response in pyspark Here's my code import requests import pyspark from pyspark.sql.functions import * from pyspark.sql import SparkSession r = requests.get('https://www.skysports.com/football-scores-fixtures') spark=SparkSe...
https://stackoverflow.com/questions/79442983/how-to-do-web-scraping-using-pyspark
python, apache-spark, web-scraping, pyspark
1,739,702,849
se_79441915
stackoverflow
DATA_ENGINEERING
How to run large scale processing of multiple shortest path finding calls?
How to run large scale processing of multiple shortest path finding calls? I'm trying to incorporate a solution that takes a start and end coordinates, alongside timestamps, to find the shortest path between them. This uses the UK road network pulled from OSM, the start and end lat and lon, and finds the closest nodes...
https://stackoverflow.com/questions/79441915/how-to-run-large-scale-processing-of-multiple-shortest-path-finding-calls
dataframe, apache-spark, pyspark, spark-graphx, graphframes
1,739,638,281
se_79441570
stackoverflow
DATA_ENGINEERING
AWS Glue error occurred while calling o149.toDF.TimestampNTZType
AWS Glue error occurred while calling o149.toDF.TimestampNTZType When attempting to use Athena to read data that I exported from a MySQL aurora DB, an error occurred saying the column payment_date contains mismatching types. The schema has the data type for payment_date set to "int" but some of the values are of data ...
https://stackoverflow.com/questions/79441570/aws-glue-error-occurred-while-calling-o149-todf-timestampntztype
python, amazon-web-services, apache-spark, pyspark, aws-glue
1,739,625,099
se_76440477
stackoverflow
DATA_ENGINEERING
How to use spark connect with Kubernetes cluster
How to use spark connect with Kubernetes cluster I'm currently trying to setup spark connect on kubernetes. I'm just wondering if anyone has done this. I'm trying to figure out if I need to setup a stand alone spark cluster on kubernetes for the spark connect service using my own helm chart or if I can use the kuberne...
https://stackoverflow.com/questions/76440477/how-to-use-spark-connect-with-kubernetes-cluster
apache-spark, kubernetes, pyspark
1,686,315,347
se_79322137
stackoverflow
DATA_ENGINEERING
spark.sql.extensions config item is not set in PySpark
spark.sql.extensions config item is not set in PySpark I am using AWS glue notebook and here is my Spark configuration: %idle_timeout 2880 %glue_version 4.0 %worker_type G.1X %number_of_workers 2 from pyspark import SparkContext, SparkConf from pyspark.context import SparkContext from awsglue.context import GlueConte...
https://stackoverflow.com/questions/79322137/spark-sql-extensions-config-item-is-not-set-in-pyspark
apache-spark, pyspark, aws-glue, apache-iceberg, spark-notebook
1,735,756,631
se_79392445
stackoverflow
DATA_ENGINEERING
Spark 3.1.2: Kubernetes Client Closed Warning Leading to Executor Task Hanging – How to Fix or Work Around?
Spark 3.1.2: Kubernetes Client Closed Warning Leading to Executor Task Hanging – How to Fix or Work Around? I’m using Spark version 3.1.2 in Kubernetes. Occasionally, I encounter an issue where logs show a warning "WARN ExecutorPodsWatchSnapshotSource: Kubernetes client has been closed," followed by the application ha...
https://stackoverflow.com/questions/79392445/spark-3-1-2-kubernetes-client-closed-warning-leading-to-executor-task-hanging
apache-spark, kubernetes
1,738,021,194
se_59358705
stackoverflow
DATA_ENGINEERING
remove a single quote in a string with pySpark using regex
remove a single quote in a string with pySpark using regex I need to remove a single quote in a string. The column name is Keywords. I have an array hidden in a string. So I need to use Regex within Spark Dataframe to remove a single quote from the beginning of the string and at the end. The string looks like this: ...
https://stackoverflow.com/questions/59358705/remove-a-single-quote-in-a-string-with-pyspark-using-regex
regex, apache-spark, pyspark
1,576,506,667
se_66951321
stackoverflow
DATA_ENGINEERING
Getting null when trying to read a column with value &#39;-&#39; from aws glue catalog table
Getting null when trying to read a column with value &#39;-&#39; from aws glue catalog table I am reading an Athena table which has a column name br_book_gl1 which has values as '-' and '+'. Athena Source data I am getting the '+'value when reading it as glue catalog table but for '-' values, I am getting null. The da...
https://stackoverflow.com/questions/66951321/getting-null-when-trying-to-read-a-column-with-value-from-aws-glue-catalog-t
apache-spark, aws-glue
1,617,617,264
se_43257324
stackoverflow
DATA_ENGINEERING
What is the use of --driver-class-path in the spark command?
What is the use of --driver-class-path in the spark command? As per spark docs, To get started you will need to include the JDBC driver for you particular database on the spark classpath. For example, to connect to postgres from the Spark Shell you would run the following command: bin/spark-shell --driver-class...
https://stackoverflow.com/questions/43257324/what-is-the-use-of-driver-class-path-in-the-spark-command
apache-spark
1,491,486,910
se_66733199
stackoverflow
DATA_ENGINEERING
Error while running first Pyspark program in Jupyter
Error while running first Pyspark program in Jupyter I am a beginner in Pyspark, trying to execute few lines of code in a Jupyter notebook. I have followed the instructions available(pretty old - https://changhsinlee.com/install-pyspark-windows-jupyter/) in the internet to configure Pyspark post installing Python-3.8....
https://stackoverflow.com/questions/66733199/error-while-running-first-pyspark-program-in-jupyter
python, apache-spark, pyspark
1,616,335,009
se_45822242
stackoverflow
DATA_ENGINEERING
Does Spark preserve record order when reading in ordered files?
Does Spark preserve record order when reading in ordered files? I'm using Spark to read in records (in this case in csv files) and process them. The files are already in some order, but this order isn't reflected by any column (think of it as a time series, but without any timestamp column -- each row is just in a re...
https://stackoverflow.com/questions/45822242/does-spark-preserve-record-order-when-reading-in-ordered-files
apache-spark
1,503,417,355
se_72211888
stackoverflow
DATA_ENGINEERING
How to get week of month in Spark 3.0+?
How to get week of month in Spark 3.0+? I cannot find any datetime formatting pattern to get the week of month in spark 3.0+ As use of 'W' is deprecated, is there a solution to get week of month without using legacy option? The below code doesn't work for spark 3.2.1 df = df.withColumn("weekofmonth", f.date_format(f.c...
https://stackoverflow.com/questions/72211888/how-to-get-week-of-month-in-spark-3-0
apache-spark, datetime, pyspark, apache-spark-sql, apache-spark-3.0
1,652,341,905
se_79436806
stackoverflow
DATA_ENGINEERING
_$folder$ getting created while writing to S3 using spark
_$folder$ getting created while writing to S3 using spark While running a job on emr and creating a hive external table to s3, a marker folder of 0Byte is getting created at root level bucket/test$_folder$ my external location is s3://bucket/test/table_name Some articles said this happens when actual folder(test in th...
https://stackoverflow.com/questions/79436806/folder-getting-created-while-writing-to-s3-using-spark
apache-spark, amazon-s3, hive
1,739,459,238
se_79436654
stackoverflow
DATA_ENGINEERING
why the spark task not serialized?
why the spark task not serialized? this is the exception by the VarScoreData is a case class code: case class VarScoreData(part: String, day: String, tel: String, var_array: Array[Double], score_array: Array[Double]) spark.sparkContext.textFile(s"xxxxxxxxxxxxxxxxxxxxxxxxxxxx").map(line => { val dataAr...
https://stackoverflow.com/questions/79436654/why-the-spark-task-not-serialized
apache-spark, apache-hudi
1,739,459,050
se_79408067
stackoverflow
DATA_ENGINEERING
Spark DataFrame Schema Mismatch: Null Value in Nested Struct Field Causing Runtime Exception
Spark DataFrame Schema Mismatch: Null Value in Nested Struct Field Causing Runtime Exception I have a below spark dataframe which I am using to create another dataframe with defined schema. +----------+-----------------------+----------------------+-----------+------+-------------+------------+ |TECHNOLOGY|KPI_NAME ...
https://stackoverflow.com/questions/79408067/spark-dataframe-schema-mismatch-null-value-in-nested-struct-field-causing-runti
scala, apache-spark
1,738,567,040
se_35738508
stackoverflow
DATA_ENGINEERING
What is a glom?. How it is different from mapPartitions?
What is a glom?. How it is different from mapPartitions? I've come across the glom() method on RDD. As per the documentation Return an RDD created by coalescing all elements within each partition into an array Does glom shuffle the data across the partitions or does it only return the partition data as an array...
https://stackoverflow.com/questions/35738508/what-is-a-glom-how-it-is-different-from-mappartitions
apache-spark, rdd
1,456,892,853
se_44287175
stackoverflow
DATA_ENGINEERING
How to replace the groupByKey with reduceByKey to return as an Iterable value in Spark java?
How to replace the groupByKey with reduceByKey to return as an Iterable value in Spark java? I have a spark java program where a groupByKey with a mapValues step is done and it returns a PairRDD with value as an Iterable of all the input rdd values. I have read that replacing reduceByKey in the place of groupByKey wi...
https://stackoverflow.com/questions/44287175/how-to-replace-the-groupbykey-with-reducebykey-to-return-as-an-iterable-value-in
java, apache-spark
1,496,240,058
se_79299918
stackoverflow
DATA_ENGINEERING
How to give absolute path in scala for dataset on remote server
How to give absolute path in scala for dataset on remote server Detailed Background: I have to execute a scala jar file (containing probability algo implementation) on a remote cluster which has the big data set in one of the subfolders. So I create jar file locally, then scp to remote server, and connect to remote se...
https://stackoverflow.com/questions/79299918/how-to-give-absolute-path-in-scala-for-dataset-on-remote-server
scala, apache-spark
1,734,806,470
se_79412642
stackoverflow
DATA_ENGINEERING
Pyspark java UDF java.lang.OutOfMemoryError: Requested array size exceeds VM limit. SQLSTATE: 39000
Pyspark java UDF java.lang.OutOfMemoryError: Requested array size exceeds VM limit. SQLSTATE: 39000 I am running pyspark code with JAVA UDF in databricks. I have r6id.xlarge (32g) driver and node of r6id.4xlarge (128) worker. I am reading only one file and my java UDF is just calling an open source X12 java lib to par...
https://stackoverflow.com/questions/79412642/pyspark-java-udf-java-lang-outofmemoryerror-requested-array-size-exceeds-vm-lim
apache-spark, pyspark
1,738,692,580
se_79418290
stackoverflow
DATA_ENGINEERING
pyspark foreachPartition not getting executed
pyspark foreachPartition not getting executed I am trying to copy data from an iceberg table to a postgres table using a glue job. I have this code: def execute_job(spark, factory: DependencyFactory, environment, logger):    print("Starting job")    sql = f"SELECT * FROM {DATABASE_NAME}.transactions ORDER BY unique...
https://stackoverflow.com/questions/79418290/pyspark-foreachpartition-not-getting-executed
python, apache-spark, pyspark
1,738,851,704
se_79418674
stackoverflow
DATA_ENGINEERING
Spark Excel library unable to read whole columns, only specific data address ranges
Spark Excel library unable to read whole columns, only specific data address ranges Java app here using the Spark Excel library to read an Excel file into a Dataset<Row>. When I use the following configurations: String filePath = "file:///Users/myuser/example-data.xlsx"; Dataset<Row> dataset = spark.read() .fo...
https://stackoverflow.com/questions/79418674/spark-excel-library-unable-to-read-whole-columns-only-specific-data-address-ran
java, apache-spark, apache-poi, spark-excel
1,738,859,407
se_44411493
stackoverflow
DATA_ENGINEERING
java.lang.NoClassDefFoundError: org/apache/hadoop/fs/StorageStatistics
java.lang.NoClassDefFoundError: org/apache/hadoop/fs/StorageStatistics I'm trying to run a simple spark to s3 app from a server but I keep getting the below error because the server has hadoop 2.7.3 installed and it looks like it doesn't include the GlobalStorageStatistics class. I have hadoop 2.8.x defined in my pom....
https://stackoverflow.com/questions/44411493/java-lang-noclassdeffounderror-org-apache-hadoop-fs-storagestatistics
hadoop, apache-spark
1,496,835,202
se_77563084
stackoverflow
DATA_ENGINEERING
Pyspark with Iceberg Catalog not found
Pyspark with Iceberg Catalog not found I'm attempting to create a basic Iceberg table and query it using PySpark on my local Mac. However, I'm encountering an issue where my code is unable to locate the catalog that I previously created with PySpark SQL. The command I'm using to create the catalog is: spark-sql --pack...
https://stackoverflow.com/questions/77563084/pyspark-with-iceberg-catalog-not-found
apache-spark, pyspark, apache-spark-sql, apache-iceberg
1,701,167,155
se_44835026
stackoverflow
DATA_ENGINEERING
How to enable spark-history server for standalone cluster non hdfs mode
How to enable spark-history server for standalone cluster non hdfs mode I have setup Spark2.1.1 cluster (1 master 2 slaves) following http://paxcel.net/blog/how-to-setup-apache-spark-standalone-cluster-on-multiple-machine/ in standalone mode. I do not have a pre-Hadoop setup on of the machine. I wanted to start spark-...
https://stackoverflow.com/questions/44835026/how-to-enable-spark-history-server-for-standalone-cluster-non-hdfs-mode
apache-spark, pyspark
1,498,770,494
se_77574037
stackoverflow
DATA_ENGINEERING
Spark UI - History Server - Unable to view driver logs
Spark UI - History Server - Unable to view driver logs I have deployed "Spark History Server" in Azure Kubernetes Services(AKS) using Helm chart. Then I submitted a SparkApplication(SparkOperatorOnk8s) with the below yaml apiVersion: sparkoperator.k8s.io/v1beta2 kind: SparkApplication metadata: name: hello-world spe...
https://stackoverflow.com/questions/77574037/spark-ui-history-server-unable-to-view-driver-logs
apache-spark, kubernetes, pyspark, azure-aks, spark-ui
1,701,286,309
se_79427039
stackoverflow
DATA_ENGINEERING
Installing PySpark on Mac with pipenv
Installing PySpark on Mac with pipenv I have a setup where I use pipenv for my virtual environments. I am using a MacBook. I have done the following: Installed openJDK 11 using brew Set paths in the .zprofile folder: eval "$(/opt/homebrew/bin/brew shellenv)" export JAVA_HOME="/opt/homebrew/opt/openjdk@11" export PYS...
https://stackoverflow.com/questions/79427039/installing-pyspark-on-mac-with-pipenv
python, macos, apache-spark, pyspark
1,739,189,733
se_76959482
stackoverflow
DATA_ENGINEERING
One spark session for all notebook in Synapse
One spark session for all notebook in Synapse I don't find any solution fot start one apache spark session for all notebooks in one pipeline, any ideas ?
https://stackoverflow.com/questions/76959482/one-spark-session-for-all-notebook-in-synapse
apache-spark, pyspark, azure-synapse, azure-notebooks
1,692,778,142
se_53005093
stackoverflow
DATA_ENGINEERING
Is it possible to get yarn application id using application name via yarn cli
Is it possible to get yarn application id using application name via yarn cli I am running my spark application on yarn. Is it possible to get application id for my application, using application name through yarn cli?
https://stackoverflow.com/questions/53005093/is-it-possible-to-get-yarn-application-id-using-application-name-via-yarn-cli
apache-spark, hadoop-yarn
1,540,544,274
se_58362352
stackoverflow
DATA_ENGINEERING
Spark File Streaming get File Names
Spark File Streaming get File Names I need to know the fileName for the input file that is streamed from the input dir. Below is the spark FileStreaming code in scala programming object FileStreamExample { def main(args: Array[String]): Unit = { val sparkSession = SparkSession.builder.master("local").getOrCr...
https://stackoverflow.com/questions/58362352/spark-file-streaming-get-file-names
scala, apache-spark, spark-streaming, filestream
1,570,959,753