Class BigQuerySchemaUtil (2.44.1)

public class BigQuerySchemaUtil

Inheritance

java.lang.Object > BigQuerySchemaUtil

Static Methods

generatePlaceholderFieldName(String fieldName)

public static String generatePlaceholderFieldName(String fieldName)
  • Generates a placeholder name that consists of a prefix + base64 encoded field name. We replace all dashes with underscores as they are not allowed for proto field names.
Parameter
NameDescription
fieldNameString

name for the field

Returns
TypeDescription
String

the generated placeholder field name

getFieldName(Descriptors.FieldDescriptor fieldDescriptor)

public static String getFieldName(Descriptors.FieldDescriptor fieldDescriptor)
  • Gets the user-facing field name from the descriptor
Parameter
NameDescription
fieldDescriptorFieldDescriptor
Returns
TypeDescription
String

columnName annotation if present, otherwise return the field name.

isProtoCompatible(String fieldName)

public static boolean isProtoCompatible(String fieldName)
  • Checks if the field name is compatible with proto field naming convention.
Parameter
NameDescription
fieldNameString

name for the field

Returns
TypeDescription
boolean

true if the field name is comptaible with proto naming convention, otherwise, returns false.

Constructors

BigQuerySchemaUtil()

public BigQuerySchemaUtil()