You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@hop.apache.org by "swaroopchenchu (via GitHub)" <gi...@apache.org> on 2025/07/14 16:43:16 UTC

[D] DateTime value fetched as null from Apche hop (hop)

GitHub user swaroopchenchu created a discussion: DateTime value fetched as null from Apche hop

I see the data exists for a field in CreatedOn in database

<img width="1279" height="594" alt="image" src="https://github.com/user-attachments/assets/56a648e4-8982-4f5b-812e-a1a460f814ca" />

When i preview my query its picking null in those value

<img width="1051" height="230" alt="image" src="https://github.com/user-attachments/assets/4c708afc-0bf8-43a9-bc77-021a5f624a40" />

But my query is simple fetch from two views

SELECT 
	adj.rkn_AccountIdName,
	adj.rkn_subscriptionIdName,
	adj.rkn_name,
	adj.rkn_amount,
	adj.rkn_action,
	CASE 
        WHEN adj.rkn_action IS NOT NULL AND adj.rkn_action = 'false' THEN 1.0
       ELSE 0.0
       END AS rkn_action_new,
	adj.rkn_approvedByIdName,
	adj.rkn_AdjustmentTypeId,
    	adj.rkn_AdjustmentCategoryId,
	adj.CreatedByName,
	adj.ModifiedByName,
	adj.CreatedOn,
	adj.ModifiedOn,
    	adj.rkn_adjustmentRequestId,
	2 as inactiveState,
	99 as draftState,
	? as SPID,
	CASE 
        WHEN rkn_transactionNumber IS NOT NULL AND rkn_transactionNumber <> '' THEN 'COMPLETED'
       ELSE 'PENDING_APPROVAL'
       END AS status
FROM 
	rkn_adjustmentrequest adj, Account acc
WHERE  
	acc.name = adj.rkn_AccountIdName
AND 	adj.rkn_ServiceProviderId = ?
AND 	acc.rkn_AccountStateCurrent NOT IN ('2', '99')
AND 	rkn_AdjustmentTypeId is not null
AND	rkn_transactionNumber is not null

Any insights are appreciated, thanks

GitHub link: https://github.com/apache/hop/discussions/5519

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] DateTime value fetched as null from Apche hop (hop)

Posted by "swaroopchenchu (via GitHub)" <gi...@apache.org>.
GitHub user swaroopchenchu added a comment to the discussion: DateTime value fetched as null from Apche hop

@hansva thanks it worked.

GitHub link: https://github.com/apache/hop/discussions/5519#discussioncomment-13760570

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] DateTime value fetched as null from Apche hop (hop)

Posted by "swaroopchenchu (via GitHub)" <gi...@apache.org>.
GitHub user swaroopchenchu edited a discussion: DateTime value fetched as null from Apche hop

I see the data exists for a field in CreatedOn in database

<img width="1279" height="594" alt="image" src="https://github.com/user-attachments/assets/56a648e4-8982-4f5b-812e-a1a460f814ca" />

When i preview my query its picking null in those value
<img width="1327" height="344" alt="image" src="https://github.com/user-attachments/assets/0c667703-84f6-451e-8e27-e3f16256d3db" />

But my query is simple fetch from two views

SELECT 
	adj.rkn_AccountIdName,
	adj.rkn_subscriptionIdName,
	adj.rkn_name,
	adj.rkn_amount,
	adj.rkn_action,
	CASE 
        WHEN adj.rkn_action IS NOT NULL AND adj.rkn_action = 'false' THEN 1.0
       ELSE 0.0
       END AS rkn_action_new,
	adj.rkn_approvedByIdName,
	adj.rkn_AdjustmentTypeId,
    	adj.rkn_AdjustmentCategoryId,
	adj.CreatedByName,
	adj.ModifiedByName,
	adj.CreatedOn,
	adj.ModifiedOn,
    	adj.rkn_adjustmentRequestId,
	2 as inactiveState,
	99 as draftState,
	? as SPID,
	CASE 
        WHEN rkn_transactionNumber IS NOT NULL AND rkn_transactionNumber <> '' THEN 'COMPLETED'
       ELSE 'PENDING_APPROVAL'
       END AS status
FROM 
	rkn_adjustmentrequest adj, Account acc
WHERE  
	acc.name = adj.rkn_AccountIdName
AND 	adj.rkn_ServiceProviderId = ?
AND 	acc.rkn_AccountStateCurrent NOT IN ('2', '99')
AND 	rkn_AdjustmentTypeId is not null
AND	rkn_transactionNumber is not null

Any insights are appreciated, thanks

GitHub link: https://github.com/apache/hop/discussions/5519

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] DateTime value fetched as null from Apche hop (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
GitHub user hansva added a comment to the discussion: DateTime value fetched as null from Apche hop

Actually it's sqlserver? I think that should be correct already? What connection type are you using? 

GitHub link: https://github.com/apache/hop/discussions/5519#discussioncomment-13754627

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] DateTime value fetched as null from Apche hop (hop)

Posted by "swaroopchenchu (via GitHub)" <gi...@apache.org>.
GitHub user swaroopchenchu edited a discussion: DateTime value fetched as null from Apche hop

I see the data exists for a field in CreatedOn(dateTime dataType) in database

<img width="1279" height="594" alt="image" src="https://github.com/user-attachments/assets/56a648e4-8982-4f5b-812e-a1a460f814ca" />

When i preview my query its picking null in those value
<img width="1327" height="344" alt="image" src="https://github.com/user-attachments/assets/0c667703-84f6-451e-8e27-e3f16256d3db" />

But my query is simple fetch from two views

SELECT 
	adj.rkn_AccountIdName,
	adj.rkn_subscriptionIdName,
	adj.rkn_name,
	adj.rkn_amount,
	adj.rkn_action,
	CASE 
        WHEN adj.rkn_action IS NOT NULL AND adj.rkn_action = 'false' THEN 1.0
       ELSE 0.0
       END AS rkn_action_new,
	adj.rkn_approvedByIdName,
	adj.rkn_AdjustmentTypeId,
    	adj.rkn_AdjustmentCategoryId,
	adj.CreatedByName,
	adj.ModifiedByName,
	adj.CreatedOn,
	adj.ModifiedOn,
    	adj.rkn_adjustmentRequestId,
	2 as inactiveState,
	99 as draftState,
	? as SPID,
	CASE 
        WHEN rkn_transactionNumber IS NOT NULL AND rkn_transactionNumber <> '' THEN 'COMPLETED'
       ELSE 'PENDING_APPROVAL'
       END AS status
FROM 
	rkn_adjustmentrequest adj, Account acc
WHERE  
	acc.name = adj.rkn_AccountIdName
AND 	adj.rkn_ServiceProviderId = ?
AND 	acc.rkn_AccountStateCurrent NOT IN ('2', '99')
AND 	rkn_AdjustmentTypeId is not null
AND	rkn_transactionNumber is not null

Any insights are appreciated, thanks

GitHub link: https://github.com/apache/hop/discussions/5519

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org


Re: [D] DateTime value fetched as null from Apche hop (hop)

Posted by "hansva (via GitHub)" <gi...@apache.org>.
GitHub user hansva added a comment to the discussion: DateTime value fetched as null from Apche hop

On your database connection, go to the advanced tab and enable "supports timestamps" could you also make a bug ticket with your database type and version so we can change the code to activate it by default for new connections.

GitHub link: https://github.com/apache/hop/discussions/5519#discussioncomment-13754625

----
This is an automatically sent email for users@hop.apache.org.
To unsubscribe, please send an email to: users-unsubscribe@hop.apache.org