chamikaramj commented on code in PR #24783:
URL: https://github.com/apache/beam/pull/24783#discussion_r1088485772
##########
sdks/python/apache_beam/transforms/external.py:
##########
@@ -367,6 +367,32 @@ def discover(expansion_service):
inputs=proto_config.input_pcollection_names,
outputs=proto_config.output_pcollection_names)
+ @staticmethod
+ def discover_one(expansion_service, name):
Review Comment:
How about "discover_config()" ?
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryUtils.java:
##########
@@ -691,6 +692,12 @@ public static Row toBeamRow(Schema rowSchema, TableSchema
bqSchema, TableRow jso
if (JSON_VALUE_PARSERS.containsKey(fieldType.getTypeName())) {
return
JSON_VALUE_PARSERS.get(fieldType.getTypeName()).apply(jsonBQString);
} else if (fieldType.isLogicalType(SqlTypes.DATETIME.getIdentifier())) {
+ // Handle if datetime value is in micros
Review Comment:
Does BQ support both these formats ?
Also, let's add a log to the catch clause justifying swelling the exception
here.
##########
sdks/python/apache_beam/transforms/external.py:
##########
@@ -367,6 +367,32 @@ def discover(expansion_service):
inputs=proto_config.input_pcollection_names,
outputs=proto_config.output_pcollection_names)
+ @staticmethod
+ def discover_one(expansion_service, name):
+ """Discover one SchemaTransform by name in the given expansion service.
Review Comment:
Can we add a unit test for this one with a mock service ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]