Provide functions for the interactive shell
Provide functions for the interactive shell
In SMV's tools/conf/smv_shell_init.scala or project's conf/shell_init.scala add
import org.tresamigos.smv.shell._
list all ancestors of a dataset
ancestors are datasets current dataset depends on, directly or in-directly,
even include datasets from other stages
Resolve SmvDataSet
Resolve SmvDataSet
an SmvDataSet
result DataFrame
Export dataset's running result to a Hive table
take a DS, print in-stage dependency of that DS
take no parameter, print stages and inter-stage links
take a stage name and print all DS in this stage, without unused input DS
list all the smv-shell commands
list all the datasets in the entire project
list all datasets in a stage
list all datasets in a stage
could be the FQN or just the basename
list dead datasets in the entire project
list dead datasets in a stage
dead dataset is defined as "no contribution to the Output modules of the stage"
list dead datasets in a stage
dead dataset is defined as "no contribution to the Output modules of the stage"
could be the FQN or the basename
list deadLeaf datasets in the entire project
list deadLeaf datasets in a stage
deadLeaf dataset is defined as "no modules in the stage depend on it, excluding Output modules"
Note: a deadLeaf dataset must be dead, but some dead datasets are Not deadLeafs
list deadLeaf datasets in a stage
deadLeaf dataset is defined as "no modules in the stage depend on it, excluding Output modules"
Note: a deadLeaf dataset must be dead, but some dead datasets are Not deadLeafs
could be the FQN or the basename
list all the stages
Print current time
Read in a Csv file as DF
Read in a Hive table as DF
Try best to discover Schema from raw Csv file
Try best to discover Schema from raw Csv file
Csv file path and name
number of records to check for schema discovery, default 100k
CsvAttributes, default CsvWithHeader Will save a schema file with postfix ".toBeReviewed" in local directory.
Provide functions for the interactive shell
In SMV's
tools/conf/smv_shell_init.scalaor project'sconf/shell_init.scalaaddimport org.tresamigos.smv.shell._