Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [connectors] elasticsearch Index not supports field name variables #8390

Closed
2 of 3 tasks
zhdech opened this issue Dec 27, 2024 · 9 comments · Fixed by #8392
Closed
2 of 3 tasks

[Bug] [connectors] elasticsearch Index not supports field name variables #8390

zhdech opened this issue Dec 27, 2024 · 9 comments · Fixed by #8392
Labels

Comments

@zhdech
Copy link
Contributor

zhdech commented Dec 27, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

When writing ES, the dynamic index [seatun_ ${age}] cannot be used, and this field must appear in the seatunRow. If not, we will consider it as a regular index
After debugging, I should first replace the variables and then verify if the index is correct; But now the code logic is reversed, causing some variables to report errors (unable to enter replacement logic)
写ES时,无法使用动态索引【 seatunnel_${age},并且该字段必须出现在 seatunnel Row 中。如果没有,我们将把它视为普通索引】

debug了下,应该是先替换变量,然后在验证索引是否正确;但是现在代码逻辑反了,导致有变量是报错(无法进入到替换逻辑)


SeaTunnel Version

2.3.8
5f39e803878f420969519b608d11aff
d08f5c8498f4ead423c690d241aedfc
f92e49563aaa06d2a7e7452ff1b6084

SeaTunnel Config

env {
  parallelism = 1
  job.mode = "BATCH"
}

source {
  FakeSource {
    parallelism = 1
    result_table_name = "fake"
    field_names = ["TYPE","NAME","age","NATIONALILY","createtime","sys_day"]
    schema = {
      fields {
        TYPE = "int"
        NAME = "string"
        age = "string"
        NATIONALILY = "string"
        createtime = "TIMESTAMP"
        sys_day = "string"
      }
    }
  	rows = [
      {
        kind = INSERT
        fields = [2, "test_priori_001", "9", "法国", "2024-10-14 00:45:00", "202401226"]
      }
    ]
  }
}
sink {
   Elasticsearch {
      source_table_name= [
        "fake"
      ]
      hosts = ["192.168.2.6:9200"]
      index = "seatunnel-${age}"    # age该字段必须出现在 seatunnel Row 中。如果没有,我们将把它视为普通索引
      log_level = "DEBUG"
   }
}

Running Command

[] 2024-12-27 10:13:15,123 ERROR org.apache.seatunnel.core.starter.SeaTunnel - 

===============================================================================
[] 2024-12-27 10:13:15,123 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Reason:SeaTunnel job executed failed 

[] 2024-12-27 10:13:15,125 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Exception StackTrace:org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:226)
	at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
	at org.apache.seatunnel.example.engine.SeaTunnelEngineLocalExample.main(SeaTunnelEngineLocalExample.java:51)
Caused by: java.util.concurrent.CompletionException: org.apache.seatunnel.engine.common.exception.JobException: org.apache.seatunnel.common.exception.SeaTunnelRuntimeException: ErrorCode:[API-09], ErrorDescription:[Handle save mode failed]
	at org.apache.seatunnel.engine.server.master.JobMaster.handleSaveMode(JobMaster.java:526)
	at org.apache.seatunnel.engine.server.master.JobMaster.handleSaveMode(JobMaster.java:532)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.Iterator.forEachRemaining(Iterator.java:116)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at org.apache.seatunnel.engine.server.master.JobMaster.init(JobMaster.java:255)
	at org.apache.seatunnel.engine.server.CoordinatorService.lambda$submitJob$6(CoordinatorService.java:647)
	at org.apache.seatunnel.api.tracing.MDCRunnable.run(MDCRunnable.java:39)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
===============================================================================

Error Exception

[] 2024-12-27 10:13:15,123 ERROR org.apache.seatunnel.core.starter.SeaTunnel - 

===============================================================================


[] 2024-12-27 10:13:15,123 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Fatal Error, 

[] 2024-12-27 10:13:15,123 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Please submit bug report in https://github.com/apache/seatunnel/issues

[] 2024-12-27 10:13:15,123 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Reason:SeaTunnel job executed failed 

[] 2024-12-27 10:13:15,125 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Exception StackTrace:org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:226)
	at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
	at org.apache.seatunnel.example.engine.SeaTunnelEngineLocalExample.main(SeaTunnelEngineLocalExample.java:51)
Caused by: java.util.concurrent.CompletionException: org.apache.seatunnel.engine.common.exception.JobException: org.apache.seatunnel.common.exception.SeaTunnelRuntimeException: ErrorCode:[API-09], ErrorDescription:[Handle save mode failed]
	at org.apache.seatunnel.engine.server.master.JobMaster.handleSaveMode(JobMaster.java:526)
	at org.apache.seatunnel.engine.server.master.JobMaster.handleSaveMode(JobMaster.java:532)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.Iterator.forEachRemaining(Iterator.java:116)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at org.apache.seatunnel.engine.server.master.JobMaster.init(JobMaster.java:255)
	at org.apache.seatunnel.engine.server.CoordinatorService.lambda$submitJob$6(CoordinatorService.java:647)
	at org.apache.seatunnel.api.tracing.MDCRunnable.run(MDCRunnable.java:39)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Illegal character in path at index 12: /seatunnel-${age}
	at org.elasticsearch.client.RestClient.buildUri(RestClient.java:569)
	at org.elasticsearch.client.RestClient$InternalRequest.<init>(RestClient.java:699)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:234)
	at org.apache.seatunnel.connectors.seatunnel.elasticsearch.client.EsRestClient.createIndex(EsRestClient.java:464)
	at org.apache.seatunnel.connectors.seatunnel.elasticsearch.client.EsRestClient.createIndex(EsRestClient.java:454)
	at org.apache.seatunnel.connectors.seatunnel.elasticsearch.catalog.ElasticSearchCatalog.createTable(ElasticSearchCatalog.java:190)
	at org.apache.seatunnel.api.sink.DefaultSaveModeHandler.createTable(DefaultSaveModeHandler.java:189)
	at org.apache.seatunnel.api.sink.DefaultSaveModeHandler.createSchemaWhenNotExist(DefaultSaveModeHandler.java:115)
	at org.apache.seatunnel.api.sink.DefaultSaveModeHandler.handleSchemaSaveMode(DefaultSaveModeHandler.java:74)
	at org.apache.seatunnel.api.sink.SaveModeHandler.handleSaveMode(SaveModeHandler.java:40)
	at org.apache.seatunnel.api.sink.SaveModeExecuteWrapper.execute(SaveModeExecuteWrapper.java:36)
	at org.apache.seatunnel.engine.server.master.JobMaster.handleSaveMode(JobMaster.java:524)
	... 21 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 12: /seatunnel-${age}
	at java.net.URI$Parser.fail(URI.java:2848)
	at java.net.URI$Parser.checkChars(URI.java:3021)
	at java.net.URI$Parser.parseHierarchical(URI.java:3105)
	at java.net.URI$Parser.parse(URI.java:3063)
	at java.net.URI.<init>(URI.java:588)
	at org.apache.http.client.utils.URIBuilder.<init>(URIBuilder.java:82)
	at org.elasticsearch.client.RestClient.buildUri(RestClient.java:563)
	... 32 more

	at com.hazelcast.spi.impl.AbstractInvocationFuture.wrapInCompletionException(AbstractInvocationFuture.java:1347)
	at com.hazelcast.spi.impl.AbstractInvocationFuture.cascadeException(AbstractInvocationFuture.java:1340)
	at com.hazelcast.spi.impl.AbstractInvocationFuture.access$200(AbstractInvocationFuture.java:65)
	at com.hazelcast.spi.impl.AbstractInvocationFuture$ApplyNode.execute(AbstractInvocationFuture.java:1478)
	at com.hazelcast.spi.impl.AbstractInvocationFuture.unblockOtherNode(AbstractInvocationFuture.java:797)
	at com.hazelcast.spi.impl.AbstractInvocationFuture.unblockAll(AbstractInvocationFuture.java:759)
	at com.hazelcast.spi.impl.AbstractInvocationFuture.complete0(AbstractInvocationFuture.java:1235)
	at com.hazelcast.spi.impl.AbstractInvocationFuture.completeExceptionallyInternal(AbstractInvocationFuture.java:1223)
	at com.hazelcast.spi.impl.AbstractInvocationFuture.completeExceptionally(AbstractInvocationFuture.java:709)
	at com.hazelcast.client.impl.spi.impl.ClientInvocation.completeExceptionally(ClientInvocation.java:294)
	at com.hazelcast.client.impl.spi.impl.ClientInvocation.notifyExceptionWithOwnedPermission(ClientInvocation.java:321)
	at com.hazelcast.client.impl.spi.impl.ClientInvocation.notifyException(ClientInvocation.java:304)
	at com.hazelcast.client.impl.spi.impl.ClientResponseHandlerSupplier.handleResponse(ClientResponseHandlerSupplier.java:164)
	at com.hazelcast.client.impl.spi.impl.ClientResponseHandlerSupplier.process(ClientResponseHandlerSupplier.java:141)
	at com.hazelcast.client.impl.spi.impl.ClientResponseHandlerSupplier.access$300(ClientResponseHandlerSupplier.java:60)
	at com.hazelcast.client.impl.spi.impl.ClientResponseHandlerSupplier$DynamicResponseHandler.accept(ClientResponseHandlerSupplier.java:251)
	at com.hazelcast.client.impl.spi.impl.ClientResponseHandlerSupplier$DynamicResponseHandler.accept(ClientResponseHandlerSupplier.java:243)
	at com.hazelcast.client.impl.connection.tcp.TcpClientConnection.handleClientMessage(TcpClientConnection.java:245)
	at com.hazelcast.client.impl.protocol.util.ClientMessageDecoder.handleMessage(ClientMessageDecoder.java:135)
	at com.hazelcast.client.impl.protocol.util.ClientMessageDecoder.onRead(ClientMessageDecoder.java:89)
	at com.hazelcast.internal.networking.nio.NioInboundPipeline.process(NioInboundPipeline.java:136)
	at com.hazelcast.internal.networking.nio.NioThread.processSelectionKey(NioThread.java:383)
	at com.hazelcast.internal.networking.nio.NioThread.processSelectionKeys(NioThread.java:368)
	at com.hazelcast.internal.networking.nio.NioThread.selectLoop(NioThread.java:294)
	at com.hazelcast.internal.networking.nio.NioThread.executeRun(NioThread.java:249)
	at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102)
Caused by: org.apache.seatunnel.engine.common.exception.JobException: org.apache.seatunnel.common.exception.SeaTunnelRuntimeException: ErrorCode:[API-09], ErrorDescription:[Handle save mode failed]
	at org.apache.seatunnel.engine.server.master.JobMaster.handleSaveMode(JobMaster.java:526)
	at org.apache.seatunnel.engine.server.master.JobMaster.handleSaveMode(JobMaster.java:532)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.Iterator.forEachRemaining(Iterator.java:116)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at org.apache.seatunnel.engine.server.master.JobMaster.init(JobMaster.java:255)
	at org.apache.seatunnel.engine.server.CoordinatorService.lambda$submitJob$6(CoordinatorService.java:647)
	at org.apache.seatunnel.api.tracing.MDCRunnable.run(MDCRunnable.java:39)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Illegal character in path at index 12: /seatunnel-${age}
	at org.elasticsearch.client.RestClient.buildUri(RestClient.java:569)
	at org.elasticsearch.client.RestClient$InternalRequest.<init>(RestClient.java:699)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:234)
	at org.apache.seatunnel.connectors.seatunnel.elasticsearch.client.EsRestClient.createIndex(EsRestClient.java:464)
	at org.apache.seatunnel.connectors.seatunnel.elasticsearch.client.EsRestClient.createIndex(EsRestClient.java:454)
	at org.apache.seatunnel.connectors.seatunnel.elasticsearch.catalog.ElasticSearchCatalog.createTable(ElasticSearchCatalog.java:190)
	at org.apache.seatunnel.api.sink.DefaultSaveModeHandler.createTable(DefaultSaveModeHandler.java:189)
	at org.apache.seatunnel.api.sink.DefaultSaveModeHandler.createSchemaWhenNotExist(DefaultSaveModeHandler.java:115)
	at org.apache.seatunnel.api.sink.DefaultSaveModeHandler.handleSchemaSaveMode(DefaultSaveModeHandler.java:74)
	at org.apache.seatunnel.api.sink.SaveModeHandler.handleSaveMode(SaveModeHandler.java:40)
	at org.apache.seatunnel.api.sink.SaveModeExecuteWrapper.execute(SaveModeExecuteWrapper.java:36)
	at org.apache.seatunnel.engine.server.master.JobMaster.handleSaveMode(JobMaster.java:524)
	... 21 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 12: /seatunnel-${age}
	at java.net.URI$Parser.fail(URI.java:2848)
	at java.net.URI$Parser.checkChars(URI.java:3021)
	at java.net.URI$Parser.parseHierarchical(URI.java:3105)
	at java.net.URI$Parser.parse(URI.java:3063)
	at java.net.URI.<init>(URI.java:588)
	at org.apache.http.client.utils.URIBuilder.<init>(URIBuilder.java:82)
	at org.elasticsearch.client.RestClient.buildUri(RestClient.java:563)
	... 32 more

	at org.apache.seatunnel.engine.server.CoordinatorService.lambda$submitJob$6(CoordinatorService.java:654)
	at org.apache.seatunnel.api.tracing.MDCRunnable.run(MDCRunnable.java:39)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
 
[] 2024-12-27 10:13:15,125 ERROR org.apache.seatunnel.core.starter.SeaTunnel - 
===============================================================================

Zeta or Flink or Spark Version

No response

Java or Scala Version

No response

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@zhdech zhdech added the bug label Dec 27, 2024
@zhdech
Copy link
Contributor Author

zhdech commented Dec 27, 2024

@FuYouJ here

@jw-itq
Copy link
Contributor

jw-itq commented Dec 27, 2024

If it is a dynamic index, please try schema_save_mode="IGNORE" @zhdech

@zhdech
Copy link
Contributor Author

zhdech commented Dec 27, 2024

If it is a dynamic index, please try schema_save_mode="IGNORE" @zhdech
This bug can be bypassed through configuration

@jw-itq
Copy link
Contributor

jw-itq commented Dec 27, 2024

If it is a dynamic index, please try schema_save_mode="IGNORE" @zhdech
This bug can be bypassed through configuration

This may not be a bug, it is configured in this way. If it is not a dynamic index, it is necessary to manipulate the table through schema_save_mode, which includes RECREATE_SCHEMA, CREATE_SCHEMA_WHEN_NOT_EXIST,ERROR_WHEN_SCHEMA_NOT_EXIST,IGNORE, And these operations all occur before the synchronization task, which can be viewed in the document https://seatunnel.apache.org/docs/connector-v2/sink/Elasticsearch/

@zhdech
Copy link
Contributor Author

zhdech commented Dec 27, 2024

image
Two questions:

  1. Document error: When using dynamic indexing, it was not specified that schema_save_mode="IGNORE" is required.
  2. Is there a problem with the dynamic indexing logic? I understand that variables should be replaced first before checking the index name
  3. When using the mode of CREATES_SCHEMA_CHEN_NOT.exe IST for dynamic indexing, it is no longer supported

两个问题:
1、文档的错误,在使用动态索引时,没有说明schema_save_mode="IGNORE"必填。
2、动态索引 逻辑是不是存在问题,我理解应该先替换变量再做检测索引名称
3、动态索引 使用CREATE_SCHEMA_WHEN_NOT_EXIST 这种模式时就不支持了

@jw-itq
Copy link
Contributor

jw-itq commented Dec 27, 2024

image Two questions:

  1. Document error: When using dynamic indexing, it was not specified that schema_save_mode="IGNORE" is required.
  2. Is there a problem with the dynamic indexing logic? I understand that variables should be replaced first before checking the index name

两个问题: 1、文档的错误,在使用动态索引时,没有说明schema_save_mode="IGNORE"必填。 2、动态索引 逻辑是不是存在问题,我理解应该先替换变量再做检测索引名称

1,The document does have some issues and needs to be improved
2,It depends on what schema_save_mode you use,The reason for this may be that you are using the default schema_save_mode

@zhdech
Copy link
Contributor Author

zhdech commented Dec 27, 2024

image Two questions:

  1. Document error: When using dynamic indexing, it was not specified that schema_save_mode="IGNORE" is required.
  2. Is there a problem with the dynamic indexing logic? I understand that variables should be replaced first before checking the index name

两个问题: 1、文档的错误,在使用动态索引时,没有说明schema_save_mode="IGNORE"必填。 2、动态索引 逻辑是不是存在问题,我理解应该先替换变量再做检测索引名称

1,The document does have some issues and needs to be improved 2,It depends on what schema_save_mode you use,The reason for this may be that you are using the default schema_save_mode

If dynamic indexing is used, it is not supported to create a table when it does not exist by setting schema_save_mode to CREATE-SCHEMA_CHEN_NOT_deIST.The index or field is dynamically created during actual use
如果使用动态索引时,【通过设置 schema_save_mode 配置为 CREATE_SCHEMA_WHEN_NOT_EXIST 来支持不存在表时创建表】那这样就不支持了。实际使用时索引或者字段 是动态创建的

@jw-itq
Copy link
Contributor

jw-itq commented Dec 27, 2024

image Two questions:

  1. Document error: When using dynamic indexing, it was not specified that schema_save_mode="IGNORE" is required.
  2. Is there a problem with the dynamic indexing logic? I understand that variables should be replaced first before checking the index name

两个问题: 1、文档的错误,在使用动态索引时,没有说明schema_save_mode="IGNORE"必填。 2、动态索引 逻辑是不是存在问题,我理解应该先替换变量再做检测索引名称

1,The document does have some issues and needs to be improved 2,It depends on what schema_save_mode you use,The reason for this may be that you are using the default schema_save_mode

If dynamic indexing is used, it is not supported to create a table when it does not exist by setting schema_save_mode to CREATE-SCHEMA_CHEN_NOT_deIST. 如果使用动态索引时,【通过设置 schema_save_mode 配置为 CREATE_SCHEMA_WHEN_NOT_EXIST 来支持不存在表时创建表】那这样就不支持了。

Tables created with CREATE_SCHEMA_WHEN_NOT_EXIST are created by SeaTunnel, while dynamic indices are created by ES itself, so IGNORE needs to be configured.

@zhdech
Copy link
Contributor Author

zhdech commented Dec 27, 2024

image Two questions:

  1. Document error: When using dynamic indexing, it was not specified that schema_save_mode="IGNORE" is required.
  2. Is there a problem with the dynamic indexing logic? I understand that variables should be replaced first before checking the index name

两个问题: 1、文档的错误,在使用动态索引时,没有说明schema_save_mode="IGNORE"必填。 2、动态索引 逻辑是不是存在问题,我理解应该先替换变量再做检测索引名称

1,The document does have some issues and needs to be improved 2,It depends on what schema_save_mode you use,The reason for this may be that you are using the default schema_save_mode

If dynamic indexing is used, it is not supported to create a table when it does not exist by setting schema_save_mode to CREATE-SCHEMA_CHEN_NOT_deIST. 如果使用动态索引时,【通过设置 schema_save_mode 配置为 CREATE_SCHEMA_WHEN_NOT_EXIST 来支持不存在表时创建表】那这样就不支持了。

Tables created with CREATE_SCHEMA_WHEN_NOT_EXIST are created by SeaTunnel, while dynamic indices are created by ES itself, so IGNORE needs to be configured.

Okay, I understand. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants