def __init__(self, query, dialect=None): super(SqlTransform, self).__init__( self.URN, NamedTupleBasedPayloadBuilder( SqlTransformSchema(query=query, dialect=dialect)), BeamJarExpansionService( ':sdks:java:extensions:sql:expansion-service:shadowJar'))
def __init__(self, query, dialect=None, expansion_service=None): """ Creates a SqlTransform which will be expanded to Java's SqlTransform. (See class docs). :param query: The SQL query. :param dialect: (optional) The dialect, e.g. use 'zetasql' for ZetaSQL. :param expansion_service: (optional) The URL of the expansion service to use """ expansion_service = expansion_service or BeamJarExpansionService( ':sdks:java:extensions:sql:expansion-service:shadowJar') super().__init__(self.URN, NamedTupleBasedPayloadBuilder( SqlTransformSchema(query=query, dialect=dialect)), expansion_service=expansion_service)
def default_io_expansion_service(): return BeamJarExpansionService('sdks:java:io:expansion-service:shadowJar')
def default_io_expansion_service(): return BeamJarExpansionService( 'sdks:java:io:google-cloud-platform:expansion-service:shadowJar')
def default_io_expansion_service(): return BeamJarExpansionService( ':sdks:java:extensions:schemaio-expansion-service:shadowJar')
def default_io_expansion_service(classpath=None): return BeamJarExpansionService( ':sdks:java:extensions:schemaio-expansion-service:shadowJar', classpath=classpath)