I tried using sparklyr to write data to hdfs or hive, but couldn't find a way. Is it even possible to write an R data frame in hdfs or a hive using sparklyr? Please note: my R and hadoop work on two different servers, so I need a way to write to remote hdf files from R.
Relationship Rahul
Writing a Spark table for a hive using Sparklyr:
iris_spark_table <- copy_to(sc, iris, overwrite = TRUE) sdf_copy_to(sc, iris_spark_table) DBI::dbGetQuery(sc, "create table iris_hive as SELECT * FROM iris_spark_table")
You can use sdf_copy_to to copy data to Spark, say tempTable. Then use DBI::dbGetQuery(sc, "INSERT INTO TABLE MyHiveTable SELECT * FROM tempTable")to insert dataframe entries into the hive table.
DBI::dbGetQuery(sc, "INSERT INTO TABLE MyHiveTable SELECT * FROM tempTable")
Source: https://habr.com/ru/post/1680255/More articles:How to load data in Meteor app using Redux? - reactjsReact Day Picker calendar overlay event appears behind other components - reactjsWhen does a name search happen, and when not? - pythonHow to manage Meteor.user () in the configuration of Meteor-React-Redux? - reactjshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1680254/passing-fixed-size-eigen-matrices-as-arguments-to-function-calling-for-dynamic-size-matrices&usg=ALkJrhgF1J2NN9FviI_C21v6OUHfi7-YpAUsing Contact Form 7 via WP REST API - wordpressRSA decryption of AES session key fails: AttributeError: 'bytes' object has no attribute 'n' - pythonIonic - scrollable list of large images - memory usage - performanceполучить "указатель" на NavigationBarView.java путем отражения - javaWhat is the difference between Apache kafka and ActiveMQ - spring-mvcAll Articles