You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (Jira)" <ji...@apache.org> on 2021/03/04 12:34:00 UTC
[jira] [Assigned] (CAMEL-16303) URI generation: if a part of the
component name is equal to a path parameter the URI generation will fail
[ https://issues.apache.org/jira/browse/CAMEL-16303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrea Cosentino reassigned CAMEL-16303:
----------------------------------------
Assignee: Andrea Cosentino
> URI generation: if a part of the component name is equal to a path parameter the URI generation will fail
> ---------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-16303
> URL: https://issues.apache.org/jira/browse/CAMEL-16303
> Project: Camel
> Issue Type: Task
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 3.7.3, 3.9.0
>
>
> For example take this:
>
> {code:java}
> ///usr/bin/env jbang "$0" "$@" ; exit $?
> //DEPS org.apache.camel:camel-core-engine:3.8.0
> //DEPS org.apache.camel:camel-main:3.8.0
> //DEPS org.apache.camel:camel-direct:3.8.0
> //DEPS org.apache.camel:camel-google-bigquery:3.8.0
> //DEPS org.slf4j:slf4j-nop:1.7.25
> import java.util.*;
> import org.apache.camel.*;
> import org.apache.camel.spi.*;
> import org.apache.camel.builder.RouteBuilder;
> import org.apache.camel.main.Main;
> Main main = new Main();
> main.configure().addRoutesBuilder(new RouteBuilder() {
> @Override
> public void configure() throws Exception {
> EndpointUriFactory factory = getContext().adapt(ExtendedCamelContext.class).getEndpointUriFactory("google-bigquery-sql");
> Map<String, Object> config = Map.of(
> "projectId", "test",
> "query", "insert into test.test values (1,1)"
> );
> String uri = factory.buildUri("google-bigquery-sql", config, false);
> System.out.println("uri = " + uri);
> from("direct:start").to(uri);
> }
> });
> main.run();
>
> {code}
>
> The output of this jbang jsh file will be
> uri = google-biginsert into test.test values (1,1)-sql:test:insert into test.test values (1,1)
> which is wrong, the google-bigquery-sql is now google-big<query path param>-sql:..
> I think for google big query we need to rename the query path param, but maybe the generation and substitution needs to be checked again
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)