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.12.5 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.12.4 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.12.3 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.12.2 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.12.1 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.12.0 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.11.1 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.11.0 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.10.1 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.10.0 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.9.10 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.9.8 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.9.7 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.9.6 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.9.5 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.9.4 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py