Sha256: 0aeadcf8c5db3686e3c7344ba4ee35c936c1bb4222367de05dc39d350f78954e

Contents?: true

Size: 994 Bytes

Versions: 76

Compression:

Stored size: 994 Bytes

Contents

from org.apache.pig.scripting import Pig
import os
import sys

if __name__ == "__main__":
    params       = Pig.getParameters()
    loader       = params["LOADER"]
    input_source = params["INPUT_SRC"]
    output_path  = params["OUTPUT_PATH"]
    infer_types  = params["INFER_TYPES"]

    if os.path.exists("../%s" % output_path):
        sys.stderr.write("ERROR: Output directory file: %s exists...Aborting!\n" % output_path)
    else:
        Pig.compileFromFile("../pigscripts/characterize.pig").bind({
            "LOADER"      : loader,
            "INPUT_SRC"   : input_source,
            "OUTPUT_PATH" : output_path,
            "INFER_TYPES" : infer_types
        }).runSingle()

        for root, _, files in os.walk("../%s" % output_path):
            for f in files:
                if f[0] != '.':
                    fullpath = os.path.join(root, f)
                    copypath = os.path.join(root, f + '.csv')
                    os.system ("cp %s %s" % (fullpath, copypath))

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
mortar-0.15.53 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.52 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.51 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.50 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.49 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.48 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.47 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.46 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.45 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.44 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.43 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.42 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.41 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.40 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.39 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.38 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.37 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.36 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.35 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.34 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py