You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Alexander Filipchik (Jira)" <ji...@apache.org> on 2020/03/19 02:42:00 UTC
[jira] [Created] (HUDI-723) SqlTransformer's schema sometimes is
not registered.
Alexander Filipchik created HUDI-723:
----------------------------------------
Summary: SqlTransformer's schema sometimes is not registered.
Key: HUDI-723
URL: https://issues.apache.org/jira/browse/HUDI-723
Project: Apache Hudi (incubating)
Issue Type: Bug
Components: DeltaStreamer
Reporter: Alexander Filipchik
Fix For: 0.6.0
If schema is inferred from RowBasedSchemaProvider when SQL transformer is used it also needs to be registered.
Current way only works if SchemaProvider has a valid target schema. Is one wants to use schema from SQL transformation, the result of RowBasedSchemaProvider.getTargetSchema needs to be passed into something like:
{code:java}
private void setupWriteClient(SchemaProvider schemaProvider) {
LOG.info("Setting up Hoodie Write Client");
registerAvroSchemas(schemaProvider);
HoodieWriteConfig hoodieCfg = getHoodieClientConfig(schemaProvider);
writeClient = new HoodieWriteClient<>(jssc, hoodieCfg, true);
onInitializingHoodieWriteClient.apply(writeClient);
}
{code}
Existent method will not work as it is checking for:
{code:java}
if ((null != schemaProvider) && (null == writeClient)) {
{code}
and writeClient is already configured.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)