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 CERTIFIED_JDBC_VERSION: String

    Permalink

    The certified JDBC version to work with this spark connector version.

  5. val PROPERTY_NAME_OF_CONNECTOR_VERSION: String

    Permalink

    Important: Never change the value of PROPERTY_NAME_OF_CONNECTOR_VERSION.

    Important: Never change the value of PROPERTY_NAME_OF_CONNECTOR_VERSION. Changing it will cause spark connector doesn't work in some cases.

  6. val SNOWFLAKE_SOURCE_NAME: String

    Permalink

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

  7. val SNOWFLAKE_SOURCE_SHORT_NAME: String

    Permalink

    Short literal name of SNOWFLAKE_SOURCE_NAME

  8. val VERSION: String

    Permalink
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. 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).

  11. 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.

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

    Permalink
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def containVariant(schema: StructType): Boolean

    Permalink

    Check whether the giving DataFrame contains variant type or not

  15. def ensureQuoted(name: String): String

    Permalink

    ensure a name wrapped with double quotes

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. 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.

  20. 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

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. def getClientInfoJson(): ObjectNode

    Permalink
  23. def getClientInfoString(): String

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

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

    Permalink
  26. def getLastCopyLoad: String

    Permalink
  27. def getLastCopyUnload: String

    Permalink
  28. def getLastGetCommand: String

    Permalink
  29. def getLastPutCommand: String

    Permalink
  30. def getLastSelect: String

    Permalink
  31. def getSizeString(size: Long): String

    Permalink
  32. def getTimeString(milliSeconds: Long): String

    Permalink
  33. def hashCode(): Int

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

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

    Permalink

    check whether a name is quoted

  36. 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.

  37. def makeTempPath(tempRoot: String): String

    Permalink

    Creates a randomly named temp directory path for intermediate data

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

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

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

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

    Permalink

    create a map from string for column mapping

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

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

    Permalink

    wrap a name with double quotes

  44. def quotedNameIgnoreCase(name: String): String

    Permalink

    wrap a name with double quotes without capitalize letters

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

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

    Permalink

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

  47. def removeCredentialsFromURI(uri: URI): URI

    Permalink

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

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

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

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

    Permalink

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

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

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped