Snowpark Scala API Reference1.19.0 < Back


# Packages

-  package root
  Definition Classes
    root
-  package com
  Definition Classes
    root
-  package snowflake
  Definition Classes
    com
-  package snowpark
  Definition Classes
    snowflake
-  object Session extends Logging

  Companion object to Session that you use to build and create a session.

  Companion object to Session that you use to build and create a session.

  Definition Classes
    snowpark
  Since

    0.1.0

- SessionBuilder

c

com.snowflake.snowpark.Session

# SessionBuilder

###

#### class SessionBuilder extends AnyRef

Provides methods to set configuration properties and create a Session.

Since

  0.1.0

Linear Supertypes
AnyRef, Any

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. SessionBuilder
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### Instance Constructors

1.  new SessionBuilder()

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##: Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  def appName(appName: String): SessionBuilder

   Adds the app name to set in the query_tag after session creation.

   Adds the app name to set in the query_tag after session creation.

   Since version 1.13.0, the app name is set to the query tag in JSON format. For example:

       val session = Session.builder.appName("myApp").configFile(myConfigFile).create
       print(session.getQueryTag().get)
       {"APPNAME":"myApp"}

   In previous versions it is set using a key=value format. For example:

       val session = Session.builder.appName("myApp").configFile(myConfigFile).create
       print(session.getQueryTag().get)
       APPNAME=myApp

   appName

     Name of the app.

   returns

     A SessionBuilder

   Since

     1.12.0

5.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
6.  def clone(): AnyRef
   Attributes
     protected[lang]
   Definition Classes
     AnyRef
   Annotations
     @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
7.  def config(key: String, value: String): SessionBuilder

   Adds the specified configuration property and value to the SessionBuilder configuration.

   Adds the specified configuration property and value to the SessionBuilder configuration.

   key

     Name of the configuration property.

   value

     Value of the configuration property.

   returns

     A SessionBuilder

   Since

     0.1.0

8.  def configFile(file: String): SessionBuilder

   Adds the configuration properties in the specified file to the SessionBuilder configuration.

   Adds the configuration properties in the specified file to the SessionBuilder configuration.

   file

     Path to the file containing the configuration properties.

   returns

     A SessionBuilder

   Since

     0.1.0

9.  def configs(javaMap: Map[String, String]): SessionBuilder

   Adds the specified Java `Map` of configuration properties to the SessionBuilder configuration.

   Adds the specified Java `Map` of configuration properties to the SessionBuilder configuration.

   Note that calling this method overwrites any existing configuration properties that you have already set in the SessionBuilder.

   Since

     0.2.0

10.  def configs(configs: Map[String, String]): SessionBuilder

    Adds the specified `Map` of configuration properties to the SessionBuilder configuration.

    Adds the specified `Map` of configuration properties to the SessionBuilder configuration.

    Note that calling this method overwrites any existing configuration properties that you have already set in the SessionBuilder.

    configs

      Map of the names and values of configuration properties.

    returns

      A SessionBuilder

    Since

      0.1.0

11.  def create: Session

    Creates a new Session.

    Creates a new Session.

    returns

      A Session

    Since

      0.1.0

12.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
13.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
14.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @HotSpotIntrinsicCandidate() @native()
15.  def getOrCreate: Session

    Returns the existing session if already exists or create it if not.

    Returns the existing session if already exists or create it if not.

    returns

      A Session

    Since

      1.10.0

16.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @HotSpotIntrinsicCandidate() @native()
17.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
18.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
19.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @HotSpotIntrinsicCandidate() @native()
20.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @HotSpotIntrinsicCandidate() @native()
21.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
22.  def toString(): String
    Definition Classes
      AnyRef → Any
23.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
24.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()
25.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])

### Deprecated Value Members

1.  def finalize(): Unit
   Attributes
     protected[lang]
   Definition Classes
     AnyRef
   Annotations
     @throws(classOf[java.lang.Throwable]) @Deprecated
   Deprecated

     (Since version 9)

### Inherited from AnyRef

### Inherited from Any

### Ungrouped