Package org.apache.spark.sql.protobuf
Class functions
Object
org.apache.spark.sql.protobuf.functions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Columnfrom_protobuf(Column data, String messageClassName) Converts a binary column of Protobuf format into its corresponding catalyst value.static Columnfrom_protobuf(Column data, String messageName, byte[] binaryFileDescriptorSet) Converts a binary column of Protobuf format into its corresponding catalyst value.The Protobuf definition is provided through ProtobufFileDescriptorSet.static Columnfrom_protobuf(Column data, String messageName, byte[] binaryFileDescriptorSet, Map<String, String> options) Converts a binary column of Protobuf format into its corresponding catalyst value.The Protobuf definition is provided through ProtobufFileDescriptorSet.static Columnfrom_protobuf(Column data, String messageName, String descFilePath) Converts a binary column of Protobuf format into its corresponding catalyst value.static ColumnConverts a binary column of Protobuf format into its corresponding catalyst value.static ColumnConverts a binary column of Protobuf format into its corresponding catalyst value.static Columnto_protobuf(Column data, String messageClassName) Converts a column into binary of protobuf format.static Columnto_protobuf(Column data, String messageName, byte[] binaryFileDescriptorSet) Converts a column into binary of protobuf format.The Protobuf definition is provided through ProtobufFileDescriptorSet.static Columnto_protobuf(Column data, String messageName, byte[] binaryFileDescriptorSet, Map<String, String> options) Converts a column into binary of protobuf format.The Protobuf definition is provided through ProtobufFileDescriptorSet.static Columnto_protobuf(Column data, String messageName, String descFilePath) Converts a column into binary of protobuf format.static ColumnConverts a column into binary of protobuf format.static ColumnConverts a column into binary of protobuf format.
-
Constructor Details
-
functions
public functions()
-
-
Method Details
-
from_protobuf
public static Column from_protobuf(Column data, String messageName, String descFilePath, Map<String, String> options) Converts a binary column of Protobuf format into its corresponding catalyst value. The Protobuf definition is provided through Protobuf descriptor file.- Parameters:
data- the binary column.messageName- the protobuf message name to look for in descriptor file.descFilePath- The Protobuf descriptor file. This file is usually created usingprotocwith--descriptor_set_outand--include_importsoptions.options-- Returns:
- (undocumented)
- Since:
- 3.4.0
-
from_protobuf
public static Column from_protobuf(Column data, String messageName, byte[] binaryFileDescriptorSet, Map<String, String> options) Converts a binary column of Protobuf format into its corresponding catalyst value.The Protobuf definition is provided through ProtobufFileDescriptorSet.- Parameters:
data- the binary column.messageName- the protobuf MessageName to look for in the descriptor set.binaryFileDescriptorSet- Serialized Protobuf descriptor (FileDescriptorSet). Typically contents of file created usingprotocwith--descriptor_set_outand--include_importsoptions.options-- Returns:
- (undocumented)
- Since:
- 3.5.0
-
from_protobuf
Converts a binary column of Protobuf format into its corresponding catalyst value. The Protobuf definition is provided through Protobuf descriptor file.- Parameters:
data- the binary column.messageName- the protobuf MessageName to look for in descriptor file.descFilePath- The Protobuf descriptor file. This file is usually created usingprotocwith--descriptor_set_outand--include_importsoptions.- Returns:
- (undocumented)
- Since:
- 3.4.0
-
from_protobuf
Converts a binary column of Protobuf format into its corresponding catalyst value.The Protobuf definition is provided through ProtobufFileDescriptorSet.- Parameters:
data- the binary column.messageName- the protobuf MessageName to look for in the descriptor set.binaryFileDescriptorSet- Serialized Protobuf descriptor (FileDescriptorSet). Typically contents of file created usingprotocwith--descriptor_set_outand--include_importsoptions.- Returns:
- (undocumented)
- Since:
- 3.5.0
-
from_protobuf
Converts a binary column of Protobuf format into its corresponding catalyst value.messageClassNamepoints to Protobuf Java class. The jar containing Java class should be shaded. Specifically,com.google.protobuf.*should be shaded toorg.sparkproject.spark_protobuf.protobuf.*. https://github.com/rangadi/shaded-protobuf-classes is useful to create shaded jar from Protobuf files.- Parameters:
data- the binary column.messageClassName- The full name for Protobuf Java class. E.g.com.example.protos.ExampleEvent. The jar with these classes needs to be shaded as described above.- Returns:
- (undocumented)
- Since:
- 3.4.0
-
from_protobuf
public static Column from_protobuf(Column data, String messageClassName, Map<String, String> options) Converts a binary column of Protobuf format into its corresponding catalyst value.messageClassNamepoints to Protobuf Java class. The jar containing Java class should be shaded. Specifically,com.google.protobuf.*should be shaded toorg.sparkproject.spark_protobuf.protobuf.*. https://github.com/rangadi/shaded-protobuf-classes is useful to create shaded jar from Protobuf files.- Parameters:
data- the binary column.messageClassName- The full name for Protobuf Java class. E.g.com.example.protos.ExampleEvent. The jar with these classes needs to be shaded as described above.options-- Returns:
- (undocumented)
- Since:
- 3.4.0
-
to_protobuf
Converts a column into binary of protobuf format. The Protobuf definition is provided through Protobuf descriptor file.- Parameters:
data- the data column.messageName- the protobuf MessageName to look for in descriptor file.descFilePath- The Protobuf descriptor file. This file is usually created usingprotocwith--descriptor_set_outand--include_importsoptions.- Returns:
- (undocumented)
- Since:
- 3.4.0
-
to_protobuf
Converts a column into binary of protobuf format.The Protobuf definition is provided through ProtobufFileDescriptorSet.- Parameters:
data- the binary column.messageName- the protobuf MessageName to look for in the descriptor set.binaryFileDescriptorSet- Serialized Protobuf descriptor (FileDescriptorSet). Typically contents of file created usingprotocwith--descriptor_set_outand--include_importsoptions.- Returns:
- (undocumented)
- Since:
- 3.5.0
-
to_protobuf
public static Column to_protobuf(Column data, String messageName, String descFilePath, Map<String, String> options) Converts a column into binary of protobuf format. The Protobuf definition is provided through Protobuf descriptor file.- Parameters:
data- the data column.messageName- the protobuf MessageName to look for in descriptor file.descFilePath- the protobuf descriptor file.options-- Returns:
- (undocumented)
- Since:
- 3.4.0
-
to_protobuf
public static Column to_protobuf(Column data, String messageName, byte[] binaryFileDescriptorSet, Map<String, String> options) Converts a column into binary of protobuf format.The Protobuf definition is provided through ProtobufFileDescriptorSet.- Parameters:
data- the binary column.messageName- the protobuf MessageName to look for in the descriptor set.binaryFileDescriptorSet- Serialized Protobuf descriptor (FileDescriptorSet). Typically contents of file created usingprotocwith--descriptor_set_outand--include_importsoptions.options-- Returns:
- (undocumented)
- Since:
- 3.5.0
-
to_protobuf
Converts a column into binary of protobuf format.messageClassNamepoints to Protobuf Java class. The jar containing Java class should be shaded. Specifically,com.google.protobuf.*should be shaded toorg.sparkproject.spark_protobuf.protobuf.*. https://github.com/rangadi/shaded-protobuf-classes is useful to create shaded jar from Protobuf files.- Parameters:
data- the data column.messageClassName- The full name for Protobuf Java class. E.g.com.example.protos.ExampleEvent. The jar with these classes needs to be shaded as described above.- Returns:
- (undocumented)
- Since:
- 3.4.0
-
to_protobuf
Converts a column into binary of protobuf format.messageClassNamepoints to Protobuf Java class. The jar containing Java class should be shaded. Specifically,com.google.protobuf.*should be shaded toorg.sparkproject.spark_protobuf.protobuf.*. https://github.com/rangadi/shaded-protobuf-classes is useful to create shaded jar from Protobuf files.- Parameters:
data- the data column.messageClassName- The full name for Protobuf Java class. E.g.com.example.protos.ExampleEvent. The jar with these classes needs to be shaded as described above.options-- Returns:
- (undocumented)
- Since:
- 3.4.0
-