C++ YT Wrapper
C++ library for working with YT clusters
Loading...
Searching...
No Matches
NYT::TJobOperationPreparer Class Reference

Fluent builder class for NYT::IJob::PrepareOperation. More...

#include <operation.h>

Classes

class  TInputGroup
 Group of input tables that allows to specify properties on all of them at once. More...
class  TOutputGroup
 Group of output tables that allows to specify properties on all of them at once. More...

Public Member Functions

 TJobOperationPreparer (const IOperationPreparationContext &context)
TInputGroup BeginInputGroup (int begin, int end)
 Begin input group consisting of tables with indices [begin, end).
template<typename TCont>
TInputGroup BeginInputGroup (const TCont &indices)
 Begin input group consisting of tables with indices from indices.
TOutputGroup BeginOutputGroup (int begin, int end)
 Begin output group consisting of tables with indices [begin, end).
template<typename TCont>
TOutputGroup BeginOutputGroup (const TCont &indices)
 Begin input group consisting of tables with indices from indices.
TJobOperationPreparer & OutputSchema (int tableIndex, TTableSchema schema)
 Specify the schema for output table no tableIndex.
TJobOperationPreparer & NoOutputSchema (int tableIndex)
 Mark the output table no. tableIndex as unschematized.
TJobOperationPreparer & InputColumnRenaming (int tableIndex, const THashMap< TString, TString > &renaming)
 Specify renaming of input columns for table no. tableIndex.
TJobOperationPreparer & InputColumnFilter (int tableIndex, const TVector< TString > &columns)
 Specify what input columns of table no. tableIndex to send to job.
template<typename TRow>
TJobOperationPreparer & InputDescription (int tableIndex)
 Specify the type of input rows for table no. tableIndex.
template<typename TRow>
TJobOperationPreparer & OutputDescription (int tableIndex, bool inferSchema=true)
 Specify the type of output rows for table no. tableIndex.
TJobOperationPreparer & NodeOutput (int tableIndex)
 Set type of output rows for table no. tableIndex to TNode.
TJobOperationPreparer & InputFormatHints (TFormatHints hints)
 Specify input format hints.
TJobOperationPreparer & OutputFormatHints (TFormatHints hints)
 Specify output format hints.
TJobOperationPreparer & FormatHints (TUserJobFormatHints newFormatHints)
 Specify format hints.
"Private" members

The following methods should not be used by clients in NYT::IJob::PrepareOperation

void Finish ()
 Finish the building process.
TVector< TTableSchema > GetOutputSchemas ()
 Get output table schemas as specified by the user.
const TVector< THashMap< TString, TString > > & GetInputColumnRenamings () const
 Get input column renamings as specified by the user.
const TVector< TMaybe< TVector< TString > > > & GetInputColumnFilters () const
 Get input column filters as specified by the user.
const TVector< TMaybe< TTableStructure > > & GetInputDescriptions () const
 Get input column descriptions as specified by the user.
const TVector< TMaybe< TTableStructure > > & GetOutputDescriptions () const
 Get output column descriptions as specified by the user.
const TUserJobFormatHints & GetFormatHints () const
 Get format hints as specified by the user.

Detailed Description

Fluent builder class for NYT::IJob::PrepareOperation.

Note
Method calls are supposed to be chained.

Member Function Documentation

◆ BeginInputGroup() [1/2]

template<typename TCont>
TInputGroup NYT::TJobOperationPreparer::BeginInputGroup ( const TCont & indices)

Begin input group consisting of tables with indices from indices.

Template Parameters
TContContainer with integers. Must support std::begin and std::end functions.
Parameters
indicesIndices of tables to include in the group.

◆ BeginInputGroup() [2/2]

TInputGroup NYT::TJobOperationPreparer::BeginInputGroup ( int begin,
int end )

Begin input group consisting of tables with indices [begin, end).

Parameters
beginFirst index.
endIndex after the last one.

◆ BeginOutputGroup() [1/2]

template<typename TCont>
TOutputGroup NYT::TJobOperationPreparer::BeginOutputGroup ( const TCont & indices)

Begin input group consisting of tables with indices from indices.

Template Parameters
TContContainer with integers. Must support std::begin and std::end functions.
Parameters
indicesIndices of tables to include in the group.

◆ BeginOutputGroup() [2/2]

TOutputGroup NYT::TJobOperationPreparer::BeginOutputGroup ( int begin,
int end )

Begin output group consisting of tables with indices [begin, end).

Parameters
beginFirst index.
endIndex after the last one.

◆ FormatHints()

TJobOperationPreparer & NYT::TJobOperationPreparer::FormatHints ( TUserJobFormatHints newFormatHints)

Specify format hints.

These hints have lower priority than ones specified in spec.

◆ InputColumnFilter()

TJobOperationPreparer & NYT::TJobOperationPreparer::InputColumnFilter ( int tableIndex,
const TVector< TString > & columns )

Specify what input columns of table no. tableIndex to send to job.

Note
Filter is applied before renaming, so it must specify original column names.

◆ InputDescription()

template<typename TRow>
TJobOperationPreparer & NYT::TJobOperationPreparer::InputDescription ( int tableIndex)

Specify the type of input rows for table no. tableIndex.

Template Parameters
TRowtype of input rows.

◆ InputFormatHints()

TJobOperationPreparer & NYT::TJobOperationPreparer::InputFormatHints ( TFormatHints hints)

Specify input format hints.

These hints have lower priority than ones specified in spec.

◆ NodeOutput()

TJobOperationPreparer & NYT::TJobOperationPreparer::NodeOutput ( int tableIndex)

Set type of output rows for table no. tableIndex to TNode.

Note
Set schema via OutputSchema if needed

◆ OutputDescription()

template<typename TRow>
TJobOperationPreparer & NYT::TJobOperationPreparer::OutputDescription ( int tableIndex,
bool inferSchema = true )

Specify the type of output rows for table no. tableIndex.

Template Parameters
TRowtype of output rows.
Parameters
inferSchemaInfer schema from TRow and specify it for the output tables.

◆ OutputFormatHints()

TJobOperationPreparer & NYT::TJobOperationPreparer::OutputFormatHints ( TFormatHints hints)

Specify output format hints.

These hints have lower priority than ones specified in spec.

◆ OutputSchema()

TJobOperationPreparer & NYT::TJobOperationPreparer::OutputSchema ( int tableIndex,
TTableSchema schema )

Specify the schema for output table no tableIndex.

Note
All the output schemas must be specified either with this method, NoOutputSchema or OutputDescription with inferSchema == true

The documentation for this class was generated from the following file: