Convert bigquery result row to tf example.
tfx.extensions.google_cloud_big_query.utils.row_to_example(
field_to_type: Dict[Text, Text],
field_name_to_data: Dict[Text, Any]
) -> tf.train.Example
Args |
field_to_type
|
The name of the field to its type from BigQuery.
|
field_name_to_data
|
The data need to be converted from BigQuery that
contains field name and data.
|
Returns |
A tf.train.Example that converted from the BigQuery row. Note that BOOLEAN
type in BigQuery result will be converted to int in tf.train.Example.
|
Raises |
RuntimeError
|
If the data type is not supported to be converted.
Only INTEGER, BOOLEAN, FLOAT, STRING is supported now.
|