Object

net.snowflake.spark.snowflake

Utils

Related Doc: package snowflake

Permalink

object Utils

Various arbitrary helper functions

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Utils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val SNOWFLAKE_SOURCE_NAME: String

    Permalink

    Literal to be used with the Spark DataFrame's .format method

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def checkFileSystem(uri: URI, hadoopConfig: Configuration): Unit

    Permalink

    Given a URI, verify that the Hadoop FileSystem for that URI is not the S3 block FileSystem.

    Given a URI, verify that the Hadoop FileSystem for that URI is not the S3 block FileSystem. spark-snowflakedb cannot use this FileSystem because the files written to it will not be readable by Snowflake (and vice versa).

  7. def checkThatBucketHasObjectLifecycleConfiguration(tempDir: String, tempDirStorageType: FSType, s3Client: AmazonS3Client): Unit

    Permalink

    Checks whether the S3 bucket for the given UI has an object lifecycle configuration to ensure cleanup of temporary files.

    Checks whether the S3 bucket for the given UI has an object lifecycle configuration to ensure cleanup of temporary files. If no applicable configuration is found, this method logs a helpful warning for the user.

  8. def classForName(className: String): Class[_]

    Permalink
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def ensureQuoted(name: String): String

    Permalink

    ensure a name wrapped with double quotes

  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def fixS3Url(url: String): String

    Permalink

    Snowflake COPY and UNLOAD commands don't support s3n or s3a, but users may wish to use them for data loads.

    Snowflake COPY and UNLOAD commands don't support s3n or s3a, but users may wish to use them for data loads. This function converts the URL back to the s3:// format.

  15. def fixUrlForCopyCommand(url: String): String

    Permalink

    Converts url for the copy command.

    Converts url for the copy command. For S3, convert s3a|s3n to s3. For Azure, convert the wasb: url to azure: url.

    url

    the url to be used in hadoop/spark

    returns

    the url to be used in Snowflake

  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def getJDBCConnection(params: Map[String, String]): Connection

    Permalink
  18. def getJDBCConnection(params: Map[String, String]): Connection

    Permalink
  19. def getLastCopyLoad: String

    Permalink
  20. def getLastCopyUnload: String

    Permalink
  21. def getLastGetCommand: String

    Permalink
  22. def getLastPutCommand: String

    Permalink
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def isQuoted(name: String): Boolean

    Permalink

    check whether a name is quoted

  26. def joinUrls(a: String, b: String): String

    Permalink

    Joins prefix URL a to path suffix b, and appends a trailing /, in order to create a temp directory path for S3.

  27. def makeTempPath(tempRoot: String): String

    Permalink

    Creates a randomly named temp directory path for intermediate data

  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. def parseMap(source: String): Map[String, String]

    Permalink

    create a map from string for column mapping

  32. def printQuery(params: Map[String, String], query: String): Unit

    Permalink
  33. def quotedName(name: String): String

    Permalink

    wrap a name with double quotes

  34. def readMapFromFile(sc: SparkContext, file: String): Map[String, String]

    Permalink
  35. def readMapFromString(string: String): Map[String, String]

    Permalink

    Same as readMapFromFile, but accepts the file content as an argument

  36. def removeCredentialsFromURI(uri: URI): URI

    Permalink

    Returns a copy of the given URI with the user credentials removed.

  37. def runQuery(params: Map[String, String], query: String): ResultSet

    Permalink
  38. def runQuery(params: Map[String, String], query: String): ResultSet

    Permalink
  39. def sanitizeQueryText(q: String): String

    Permalink

    Removes (hopefully :)) sensitive content from a query string

  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  41. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  42. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped