exceptionfactory opened a new pull request, #9640:
URL: https://github.com/apache/nifi/pull/9640

   # Summary
   
   [NIFI-14129](https://issues.apache.org/jira/browse/NIFI-14129) Adds a 
`DatabaseDialectService` Controller Service interface in a new 
`nifi-database-dialect-service-api` as a migration path the existing internal 
`DatabaseAdapter` interface and associated implementations.
   
   The new `nifi-database-dialect-service-nar` includes a 
`StandardDatabaseDialectService` implementation that provides a generic 
implementation for the minimum Statement Types of ALTER, CREATE, and SELECT.
   
   The introduction of the `DatabaseDialectService` applies to the following 
Processors:
   
   - PutDatabaseRecord
   - GenerateTableFetch
   - QueryDatabaseTable
   - QueryDatabaseTableRecord
   - UpdateDatabaseTable
   
   The service also applies to the `DatabaseParameterProvider`.
   
   This pull request provides an interim transitional strategy for moving away 
from the `DatabaseAdapter` to the new `DatabaseDialectService`. The initial set 
of changes preserve existing `Database Type` properties that use 
`DatabaseAdapter` implementations and wraps interacts with the 
`DatabaseAdapter` in a new `DatabaseAdapterDatabaseDialectService`.
   
   Existing `Database Type` properties include a new value named `Database 
Dialect Service` that enables the dependent `Database Dialect Service` property 
for Controller Service implementations.
   
   This wrapping approach avoids the need to convert existing `DatabaseAdapter` 
implementations as part of this change, allowing existing Processor 
configurations to work without changes, while also support incremental 
migration of `DatabaseAdapter` implementations to new `DatabaseDialectService` 
implementations.
   
   The `DatabaseDialectService` interface has a simplified contract method 
named `getStatement()` which takes a `StatementRequest` and returns a 
`StatementResponse` containing rendered SQL. The `StatementRequest` interface 
has standard implementations, and a `QueryStatementRequest` extended interface 
for describing queries. The `getSupportedStatementTypes()` provides a concise 
method for implementations to indicate supported statements.
   
   Changes include modifications to existing unit tests that involved direct 
access to Processor methods using the `DatabaseAdapter`. Existing unit and 
integration tests against public methods and behaviors remain in place to 
validate implementation changes.
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [X] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue 
created
   
   ### Pull Request Tracking
   
   - [X] Pull Request title starts with Apache NiFi Jira issue number, such as 
`NIFI-00000`
   - [X] Pull Request commit message starts with Apache NiFi Jira issue number, 
as such `NIFI-00000`
   
   ### Pull Request Formatting
   
   - [X] Pull Request based on current revision of the `main` branch
   - [X] Pull Request refers to a feature branch with one commit containing 
changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request 
creation.
   
   ### Build
   
   - [X] Build completed using `mvn clean install -P contrib-check`
     - [X] JDK 21
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 
2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License 
Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` 
files
   
   ### Documentation
   
   - [ ] Documentation formatting appears as expected in rendered files
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to