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.33 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.32 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.31 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.30 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.29 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.28 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.27 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.26 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.25 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.24 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.23 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.22 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.21 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.20 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.19 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.18 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.17 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.16 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.15 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py
mortar-0.15.14 lib/mortar/templates/characterize/controlscripts/lib/characterize_control.py