Skip to content

Instantly share code, notes, and snippets.

use spark_connect_rs::{SparkSession, SparkSessionBuilder};
use spark_connect_rs::dataframe::SaveMode;
use spark_connect_rs::functions as F;
use spark_connect_rs::types::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let spark: SparkSession = SparkSessionBuilder::remote("sc://127.0.0.1:15002/")
.build()
@sjrusso8
sjrusso8 / readwrite.rs
Created April 4, 2024 20:11
connect_readwrite.rs
use spark_connect_rs;
use spark_connect_rs::dataframe::SaveMode;
use spark_connect_rs::{SparkSession, SparkSessionBuilder};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let spark: SparkSession =
SparkSessionBuilder::remote("sc://127.0.0.1:15002/;user_id=example_rs")
.build()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sjrusso8
sjrusso8 / _code_questions.py
Last active April 6, 2021 21:35
Code Questions
# Response to two code questions
# These functions can be further improved by type checking the input values with `isinstance`