You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "Crossoverrr (via GitHub)" <gi...@apache.org> on 2023/06/05 04:00:57 UTC
[GitHub] [iceberg] Crossoverrr opened a new issue, #7769: How to enable iceberg upsert operation!???
Crossoverrr opened a new issue, #7769:
URL: https://github.com/apache/iceberg/issues/7769
### Apache Iceberg version
0.13.0
### Query engine
Flink
### Please describe the bug 🐞
How to enable Iceberg UPSERT operation in Iceberg version 0.13.0 and flink 1.13.2?
I find object dynamicOptions is empty in method PlannerBase#translateToRel line 200, but I have set table.dynamic-table-options.enabled='true', write.upsert.enabled = true and format-version = 2 already.
Please help me about this, this problem has sucked me a lot, I have tried a lot but nothing worked...
codes is :
`public static void main(String[] args)
throws Exception
{
try {
// set up the streaming execution environment
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
StreamTableEnvironment tblEnv = StreamTableEnvironment.create(env);
org.apache.flink.configuration.Configuration flinkConf = tblEnv.getConfig().getConfiguration();
flinkConf.setBoolean("table.dynamic-table-options.enabled", true);
env.enableCheckpointing(1000);
tblEnv.executeSql("create catalog " + catalogName + " with ('type' = 'iceberg', 'catalog-type'='hadoop', 'warehouse'='" + BASE_PATH + "')");
Map<String, String> props = new HashMap<>();
props.put(TableProperties.DEFAULT_FILE_FORMAT, FileFormat.PARQUET.name());
props.put(TableProperties.UPSERT_ENABLED, "true");
props.put(TableProperties.FORMAT_VERSION, "2");
/*tblEnv.executeSql(String.format("CREATE TABLE " + catalogName + "." + databaseName + ".%s (id BIGINT,\n" +
"market_ad_id BIGINT,\n" +
"approval_notes STRING,\n" +
"network_id BIGINT,\n" +
"created_at STRING,\n" +
"updated_at STRING,\n" +
"external_approval_notes STRING, " +
"PRIMARY KEY(id) NOT ENFORCED) " +
" WITH %s",
sinkTable, toWithClause(props)));*/
tblEnv.executeSql("insert into " + catalogName + "." + databaseName + "." + sinkTable +
" values (1,1,'11',1,'1','1','1') ");
tblEnv.executeSql("select * from " + catalogName + "." + databaseName + "." + sinkTable + " ").print();
}
catch (Exception e) {
e.printStackTrace();
}
}`
--
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: issues-unsubscribe@iceberg.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] How to enable iceberg upsert operation!??? [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7769: How to enable iceberg upsert operation!???
URL: https://github.com/apache/iceberg/issues/7769
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] How to enable iceberg upsert operation!??? [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7769:
URL: https://github.com/apache/iceberg/issues/7769#issuecomment-1837287797
This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
[GitHub] [iceberg] Crossoverrr commented on issue #7769: How to enable iceberg upsert operation!???
Posted by "Crossoverrr (via GitHub)" <gi...@apache.org>.
Crossoverrr commented on issue #7769:
URL: https://github.com/apache/iceberg/issues/7769#issuecomment-1576008315
the result is it will write two same records to path data in two parquet files like pic:
<img width="925" alt="image" src="https://github.com/apache/iceberg/assets/33892550/73d94ed1-efd9-44bc-90ff-fbba57e5b69f">
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] How to enable iceberg upsert operation!??? [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7769:
URL: https://github.com/apache/iceberg/issues/7769#issuecomment-2323082726
This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org