Interface CortexSparkWriter

  • All Known Implementing Classes:
    DefaultCortexSparkWriter

    public interface CortexSparkWriter
    Interface to Cortex dataset writers. Each writer retrieves a resource specific builder to create a context for writing the dataset to an entity specific location.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      CortexConnectionWriter connection​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds, com.c12e.cortex.phoenix.Connection connection)
      Write a dataset to a Cortex Connection
      CortexConnectionWriter connection​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds, java.lang.String project, java.lang.String connectionName)
      Write a dataset to a Cortex Connection
      CortexDataSourceWriter dataSource​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds, com.c12e.cortex.phoenix.DataSource dataSource)
      Write a dataset to a Cortex DataSource Assumed correctly formatted dataset, use IngestDataSourceJob to ingest a data source from a connection
      CortexDataSourceWriter dataSource​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds, java.lang.String project, java.lang.String dataSourceName)
      Write a dataset to a Cortex DataSource Assumed correctly formatted dataset, use IngestDataSourceJob to ingest a data source from a connection
      CortexProfileWriter profile​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds, com.c12e.cortex.phoenix.ProfileSchema profileSchema)
      Write a dataset to a Cortex ProfileSchema Assumed correctly formatted dataset, use BuildProfileJob to build a profile schema
      CortexProfileWriter profile​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds, java.lang.String project, java.lang.String profileSchemaName)
      Write a dataset to a Cortex ProfileSchema Assumed correctly formatted dataset, use BuildProfileJob to build a profile schema
    • Method Detail

      • connection

        CortexConnectionWriter connection​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds,
                                          java.lang.String project,
                                          java.lang.String connectionName)
        Write a dataset to a Cortex Connection
        Parameters:
        ds - the dataset to write
        project - the name of the project
        connectionName - the name of the Connection within the project
        Returns:
        The connection writer builder
        See Also:
        Connection
      • connection

        CortexConnectionWriter connection​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds,
                                          com.c12e.cortex.phoenix.Connection connection)
        Write a dataset to a Cortex Connection
        Parameters:
        ds - the dataset to write
        connection - the Connection to write to
        Returns:
        The connection writer builder
        See Also:
        Connection
      • dataSource

        CortexDataSourceWriter dataSource​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds,
                                          java.lang.String project,
                                          java.lang.String dataSourceName)
        Write a dataset to a Cortex DataSource Assumed correctly formatted dataset, use IngestDataSourceJob to ingest a data source from a connection
        Parameters:
        ds - the dataset to write
        project - the name of the project
        dataSourceName - the name of the DataSource within the project
        Returns:
        The data source writer builder
        See Also:
        DataSource
      • dataSource

        CortexDataSourceWriter dataSource​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds,
                                          com.c12e.cortex.phoenix.DataSource dataSource)
        Write a dataset to a Cortex DataSource Assumed correctly formatted dataset, use IngestDataSourceJob to ingest a data source from a connection
        Parameters:
        ds - the dataset to write
        dataSource - the DataSource to write to
        Returns:
        The data source writer builder
        See Also:
        DataSource
      • profile

        CortexProfileWriter profile​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds,
                                    java.lang.String project,
                                    java.lang.String profileSchemaName)
        Write a dataset to a Cortex ProfileSchema Assumed correctly formatted dataset, use BuildProfileJob to build a profile schema
        Parameters:
        ds - the dataset to write
        project - the name of the project
        profileSchemaName - the name of the ProfileSchema within the project
        Returns:
        The profile schema writer builder
        See Also:
        ProfileSchema
      • profile

        CortexProfileWriter profile​(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> ds,
                                    com.c12e.cortex.phoenix.ProfileSchema profileSchema)
        Write a dataset to a Cortex ProfileSchema Assumed correctly formatted dataset, use BuildProfileJob to build a profile schema
        Parameters:
        ds - the dataset to write
        profileSchema - the ProfileSchema to write to
        Returns:
        The profile schema writer builder
        See Also:
        ProfileSchema