Questions tagged [sparklyr]

sparklyr is an alternative R interface for Apache Spark

sparklyr provides an alternative to interface for built on top of .

External links:

784 questions
-2
votes
1 answer

Multiple date formats in tbl_spark in R. I want to change all the date formats to one format (dd-mm-yyyy)

library(sparklyr) sc <- spark_connect(master = "local") date1 <- data.frame(DATE1 =c ("12-01-2020","2020-12-24", "14-May-2020","19/3/2020 14:32:15", "2020-09-08","05/05/2020"), NAME1 = c("A","B","C","D","E","F")) tbl <- copy_to(sc,…
Let's Code
  • 99
  • 7
-2
votes
1 answer

How to get last N rows of each group in sparklyr?

I have a spark data frame with columns id, category, timestamp, price columns. I want to group the data by customer id, category sort by timestamp, and get last n rows in each group. I tried the below code but it is retuning just 3 rows for overall…
Yashwanth
  • 69
  • 7
-2
votes
1 answer

How to get hours as columns in from-to timestamps (in sparklyr & R)

I am trying to calculate the time spent (in minutes) by users for each hour . An example is given below. I want to replicate this in sparklyr as well. df <- data.frame(user_id = c("x", "y", "z", "a"), start_time = c("2019-04-28…
Yogesh Kumar
  • 609
  • 6
  • 22
-2
votes
1 answer

Why is creating CSV file in Sparklyr R shows an Error?

Introdution I have written following R code by referring Link-1. Here, Sparklyr package is used in R programming to read huge data from JSON file. But, while creating CSV file, it has shown the error. R code sc <- spark_connect(master = "local",…
Shree
  • 203
  • 3
  • 22
1 2 3
52
53