QuintenBauwens commented on issue #4246:
URL: https://github.com/apache/streampipes/issues/4246#issuecomment-4043624189

   ## Root Cause Found
   **The issue is located in:**
   
_streampipes-connect-management/src/main/java/org/apache/streampipes/connect/management/compact/SchemaMetadataEnricher.java_
   
   The **convertScope()** method only accepts shorthand values (measurement, 
header, dimension), 
   
   ```
   private PropertyScope convertScope(String scope) {
       if (scope.equalsIgnoreCase("header")) {
         return PropertyScope.HEADER_PROPERTY;
       } else if (scope.equalsIgnoreCase("dimension")) {
         return PropertyScope.DIMENSION_PROPERTY;
       } else if (scope.equalsIgnoreCase("measurement")) {
         return PropertyScope.MEASUREMENT_PROPERTY;
       } else {
         return PropertyScope.NONE;
       }
     }
   ```
   
   but the "**View pipeline as code**" feature in the UI displays the full 
format (MEASUREMENT_PROPERTY, HEADER_PROPERTY) when showing an existing adapter 
configuration.
   
   <img width="1771" height="525" alt="Image" 
src="https://github.com/user-attachments/assets/a15541cb-76a3-4057-a9d1-7546139c8a13";
 />
   
   **This creates a misleading experience where:**
   
   1. User views an existing adapter via "Show as code"
   2. Copies the schema with propertyScope: MEASUREMENT_PROPERTY
   3. Uses it to create a new adapter via the compact-adapter API endpoint 
(`v2/connect/compact-adapters`)
   4. StreamPipes silently falls through to PropertyScope.NONE since 
MEASUREMENT_PROPERTY doesn't match any condition in convertScope()
   5. Data is never persisted to the Data Lake
   
   **Suggested fixes (either or both):**
   
   1. Update convertScope() to also accept the full format 
(MEASUREMENT_PROPERTY, HEADER_PROPERTY, DIMENSION_PROPERTY)
   2. Update the UI's "Show as code" to display the shorthand format so it is 
consistent with what the API actually expects


-- 
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