org.apache.spark.sql.herd

DefaultSource

class DefaultSource extends RelationProvider with CreatableRelationProvider with DataSourceRegister with Logging

A custom data source that integrates with Herd for metadata management

It delegates to the built-in Spark file formats (PARQUET, CSV, ORC) for the actual reading and writing of data.

Options

url - The URL of the Herd service to connect to

namespace - The namespace in Herd to query

businessObjectName - The business object which to query

businessObjectFormatUsage - The business object format usage to query (optional, default PRC)

businessObjectFormatFileType - A list of preferred file types to use (optional, default PARQUET, ORC, BZ)

username - The username to authenticate with (optional)

password - The password to authenticate with (optional)

credName - The CredStash credential name to use for authentication (optional)

credAGS - The CredStash AGS to use (optional, default DATABRICKS)

credSDLC - The CredStash SDLC to use (optional, default prody)

If username and password are defined those will be used for authentication. If credName is specified then that will be used. If no credentials are specified, then anonymous authentication will be used.

Example

val df = spark.read.format("herd")
.option("url", "http://localhost:8998/herd-app/rest")
.option("namespace", "mynamespace")
.option("businessObjectName", "myobject")
.load()
Linear Supertypes
Logging, DataSourceRegister, CreatableRelationProvider, RelationProvider, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DefaultSource
  2. Logging
  3. DataSourceRegister
  4. CreatableRelationProvider
  5. RelationProvider
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DefaultSource()

  2. new DefaultSource(apiClientFactory: (String, Option[String], Option[String]) ⇒ HerdApi)

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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def createRelation(sqlContext: SQLContext, mode: SaveMode, parameters: Map[String, String], data: DataFrame): BaseRelation

    Definition Classes
    DefaultSource → CreatableRelationProvider
  7. def createRelation(sqlContext: SQLContext, parameters: Map[String, String]): BaseRelation

    Definition Classes
    DefaultSource → RelationProvider
  8. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def getApiConfig(parameters: Map[String, String], sparkSession: SparkSession): (String, Option[String], Option[String])

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

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  15. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

    Attributes
    protected
    Definition Classes
    Logging
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. def isTraceEnabled(): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  18. def log: Logger

    Attributes
    protected
    Definition Classes
    Logging
  19. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  20. def logDebug(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  21. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  22. def logError(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  23. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  24. def logInfo(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  25. def logName: String

    Attributes
    protected
    Definition Classes
    Logging
  26. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  27. def logTrace(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  28. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  29. def logWarning(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def shortName(): String

    Definition Classes
    DefaultSource → DataSourceRegister
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  35. def toComplexHerdType(column: StructField): String

  36. def toComplexSparkType(col: SchemaColumn): DataType

  37. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Logging

Inherited from DataSourceRegister

Inherited from CreatableRelationProvider

Inherited from RelationProvider

Inherited from AnyRef

Inherited from Any

Ungrouped