Class BigQuerySchemaUtil (3.9.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
Name Description
fieldName String

name for the field

Returns
Type Description
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
Name Description
fieldDescriptor FieldDescriptor
Returns
Type Description
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
Name Description
fieldName String

name for the field

Returns
Type Description
boolean

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

Constructors

BigQuerySchemaUtil()

public BigQuerySchemaUtil()