treasure-data / embulk-output-td

Embulk output plugin for Treasure Data
http://www.embulk.org/
10 stars 7 forks source link

Ignore appending 'v' column to table #106

Closed trung-huynh closed 3 years ago

trung-huynh commented 3 years ago

TD's table treats 'v' column name as a reserved column name for Hive engine, it forbids any request that touches the column. API will respond 422 status code if the appended columns contain 'v'. The exception is shown below:

com.treasuredata.client.TDClientHttpException: [INVALID_INPUT] [422:Unprocessable Entity] API request to /v3/table/append-schema/trung_database/trung_salesforce_incremental has failed: Parameters are invalid
    at com.treasuredata.client.TDRequestErrorHandler.defaultHttpResponseErrorResolver(TDRequestErrorHandler.java:91) ~[td-client-0.8.4.jar:0.8.4]
    at com.treasuredata.client.TDHttpRequestHandler.resolveHttpResponseError(TDHttpRequestHandler.java:88) ~[td-client-0.8.4.jar:0.8.4]
    at com.treasuredata.client.TDHttpClient.submitRequest(TDHttpClient.java:402) [td-client-0.8.4.jar:0.8.4]
    at com.treasuredata.client.TDHttpClient.submitRequest(TDHttpClient.java:455) [td-client-0.8.4.jar:0.8.4]
    at com.treasuredata.client.TDHttpClient.call(TDHttpClient.java:546) [td-client-0.8.4.jar:0.8.4]
    at com.treasuredata.client.TDHttpClient.call(TDHttpClient.java:512) [td-client-0.8.4.jar:0.8.4]
    at com.treasuredata.client.TDClient.doPost(TDClient.java:230) [td-client-0.8.4.jar:0.8.4]
    at com.treasuredata.client.TDClient.appendTableSchema(TDClient.java:541) [td-client-0.8.4.jar:0.8.4]
    at org.embulk.output.td.TdOutputPlugin.updateSchema(TdOutputPlugin.java:811) [embulk-output-td-0.7.0.jar:0.7.0]

Due to that, 'v' should be ignored appending which is similar as what plugin is doing with 'time' column.

trung-huynh commented 3 years ago

Fixed in: https://github.com/treasure-data/embulk-output-td/pull/105