Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Annotations to generate code #773

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

gnanaprakash-ravi
Copy link
Contributor

Now generated code is closer to the written py code.

import logging
from zingg.client import *
LOG = logging.getLogger("zingg.pipes")

JPipe = getJVM().zingg.spark.client.pipe.SparkPipe
FilePipe = getJVM().zingg.common.client.pipe.FilePipe
JStructType = getJVM().org.apache.spark.sql.types.StructType

class Pipe:
    def __init__(self, name, format, preprocessors, props, id, dataset, schema, mode):
        self.pipe = getJVM().zingg.spark.client.pipe.SparkPipe()

    def setSchema(self, schema):
        self.pipe.setSchema(schema)

    def getName(self):
        return self.pipe.getName()

    def setName(self, name):
        self.pipe.setName(name)

    def getFormat(self):
        return self.pipe.getFormat()

    def setFormat(self, sinkType):
        self.pipe.setFormat(sinkType)

    def setProp(self, k, v):
        self.pipe.setProp(k, v)

    def toString(self):
        return self.pipe.toString()

@sonalgoyal sonalgoyal merged commit f9e9528 into zinggAI:enterprise Jan 26, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants