Description
For example take this:
///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();
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