This document describes the available deployment packages for the Camel Snowflake component.
- File:
camel-snowflake-1.5.0.jar - Size: ~30 KB
- Usage: For OSGi container deployment (Karaf, Felix, etc.)
- Features:
- Proper OSGi bundle with Export-Package headers
- Camel component auto-discovery
- Import-Package declarations for all dependencies
- Compatible with Apache Camel 4.x in OSGi environments
- File:
camel-snowflake-1.5.0-standalone.jar - Size: ~85 MB
- Usage: For standalone applications or environments without dependency management
- Features:
- Includes all dependencies (Camel, Snowflake JDBC, HikariCP, etc.)
- Self-contained executable component
- No external dependencies required
mvn clean package -DskipTestsCreates both OSGi bundle and standalone JAR.
mvn clean package -Prelease -DskipTestsCreates OSGi bundle, standalone JAR, sources JAR, and javadoc JAR.
mvn clean compile bundle:bundleCreates only the OSGi bundle without fat JAR.
mvn clean package -Pfatjar -DskipTestsCreates a standalone JAR with all dependencies included.
- Copy
camel-snowflake-1.5.0.jarto your OSGi container - Install required dependencies:
- Snowflake JDBC driver
- HikariCP connection pool
- Apache Camel core
- The component will be auto-discovered and available as
snowflake://
- Add
camel-snowflake-1.5.0-standalone.jarto your classpath - No additional dependencies needed
- Use the component directly in your Camel routes
<dependency>
<groupId>io.dscope.camel</groupId>
<artifactId>camel-snowflake</artifactId>
<version>1.5.0</version>
</dependency>from("timer:snowflake?period=30000")
.setHeader("CamelSnowflakeQuery", constant("SELECT COUNT(*) FROM my_table"))
.to("snowflake://myaccount?username=user&database=mydb&warehouse=compute_wh")
.log("Result: ${body}");from("direct:sampleQuery")
.setHeader("snowflake.user_id", simple("${header.userId}"))
.setBody(constant("SELECT amount FROM SOME_TABLE WHERE USER_ID = :#user_id"))
.to("snowflake://myaccount?username=user&database=SAMPLES&enableParameterBinding=true")
.log("Sample rows: ${body}");Create a .env file (see .env.example for template):
SNOWFLAKE_ACCOUNT=your-account
SNOWFLAKE_USERNAME=your-username
SNOWFLAKE_PRIVATE_KEY=your-base64-private-key
SNOWFLAKE_DATABASE=your-database
SNOWFLAKE_WAREHOUSE=your-warehouse- Private Key Authentication: PKCS#8 format support
- SQL Injection Prevention: PreparedStatement parameter binding
- Connection Pooling: HikariCP for secure connection management
- Credential Protection: Environment variable and configuration abstraction
- README.md: Complete setup and usage guide
- SAMPLE_USAGE.md: Sample usage examples and patterns
- JavaDoc: API documentation (in javadoc JAR when using release profile)
- Examples: Test classes demonstrating various use cases
For detailed configuration options and examples, see the main README.md and documentation files.