[JBoss JIRA] (TEIID-5780) Support certificate based authentication into Teiid pg
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5780?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5780:
----------------------------------
Fix Version/s: 13.1
(was: 13.0)
> Support certificate based authentication into Teiid pg
> ------------------------------------------------------
>
> Key: TEIID-5780
> URL: https://issues.jboss.org/browse/TEIID-5780
> Project: Teiid
> Issue Type: Sub-task
> Components: ODBC
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 13.1
>
> Original Estimate: 2 days
> Time Spent: 6 hours
> Remaining Estimate: 1 day, 2 hours
>
> To support the pg connection into Teiid we will do something like:
> - require a pg secure port using the service signing certificate: TEIIDSB-90 TEIIDSB-92
> -- one clarification is that we must document how to make the pg cert dominant if both pg and jdbc secure are used
> TODO:
> - configure the pg instance to have a service signing certificate and trust the Teiid service signing certificate. If that trust seems too difficult we can just configure the connection to trust all.
> - configure the pg connection to Teiid to use the pg service signing certificate as the client certificate
> - trust the pg service signing certificate at the teiid service - we need hostname validation to be enabled and the Teiid server to map the service host name to an authenticated user (this could possibly be generalized via keycloak support to more users).
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (TEIID-5780) Support certificate based authentication into Teiid pg
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5780?focusedWorklogId=12448205&page... ]
Steven Hawkins logged work on TEIID-5780:
-----------------------------------------
Author: Steven Hawkins
Created on: 03/Dec/19 7:29 AM
Start Date: 03/Dec/19 7:29 AM
Worklog Time Spent: 6 hours
Issue Time Tracking
-------------------
Remaining Estimate: 1 day, 2 hours (was: 2 days)
Time Spent: 6 hours
Worklog Id: (was: 12448205)
> Support certificate based authentication into Teiid pg
> ------------------------------------------------------
>
> Key: TEIID-5780
> URL: https://issues.jboss.org/browse/TEIID-5780
> Project: Teiid
> Issue Type: Sub-task
> Components: ODBC
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 13.1
>
> Original Estimate: 2 days
> Time Spent: 6 hours
> Remaining Estimate: 1 day, 2 hours
>
> To support the pg connection into Teiid we will do something like:
> - require a pg secure port using the service signing certificate: TEIIDSB-90 TEIIDSB-92
> -- one clarification is that we must document how to make the pg cert dominant if both pg and jdbc secure are used
> TODO:
> - configure the pg instance to have a service signing certificate and trust the Teiid service signing certificate. If that trust seems too difficult we can just configure the connection to trust all.
> - configure the pg connection to Teiid to use the pg service signing certificate as the client certificate
> - trust the pg service signing certificate at the teiid service - we need hostname validation to be enabled and the Teiid server to map the service host name to an authenticated user (this could possibly be generalized via keycloak support to more users).
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (TEIID-5780) Support certificate based authentication into Teiid pg
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5780?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5780:
----------------------------------
Original Estimate: 2 days
Remaining Estimate: 2 days
> Support certificate based authentication into Teiid pg
> ------------------------------------------------------
>
> Key: TEIID-5780
> URL: https://issues.jboss.org/browse/TEIID-5780
> Project: Teiid
> Issue Type: Sub-task
> Components: ODBC
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 13.0
>
> Original Estimate: 2 days
> Remaining Estimate: 2 days
>
> To support the pg connection into Teiid we will do something like:
> - require a pg secure port using the service signing certificate: TEIIDSB-90 TEIIDSB-92
> -- one clarification is that we must document how to make the pg cert dominant if both pg and jdbc secure are used
> TODO:
> - configure the pg instance to have a service signing certificate and trust the Teiid service signing certificate. If that trust seems too difficult we can just configure the connection to trust all.
> - configure the pg connection to Teiid to use the pg service signing certificate as the client certificate
> - trust the pg service signing certificate at the teiid service - we need hostname validation to be enabled and the Teiid server to map the service host name to an authenticated user (this could possibly be generalized via keycloak support to more users).
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (TEIID-5861) Need to properly generate SOQL for multiple nested joins
by Renat Eskenin (Jira)
[ https://issues.jboss.org/browse/TEIID-5861?page=com.atlassian.jira.plugin... ]
Renat Eskenin updated TEIID-5861:
---------------------------------
Description:
For this SQL we have wrong generated SOQL
{code}
select
price.Id,
price.IsActive__c,
price.name,
price.PriceBook__c,
book.DefaultCurrency__c,
price.Price__c,
price.ProductCode__c,
price.ProductName__c,
price.Product__c,
product.Id,
product.Name,
product.Description
from
MSRP__c as price
left outer join /*+ MAKEDEP */ Product2 as product on
price.Product__c = product.id
left outer join /*+ MAKEDEP */ Pricebook2 as book on
price.PriceBook__c = book.id
where
price.PriceBook__c =:priceBookId
and ProductCode__c in(
:productCodes
)
and IsActive__c = true"
{code}
{code}
START DATA SRC COMMAND: startTime=2019-12-02 12:43:54.368 requestID=9MPiB/GOwB5f.0 sourceCommandID=3 executionID=2 txID=null modelName=sf translatorName=salesforce sessionID=9MPiB/GOwB5f principal=anonymous sql=SELECT sf.Pricebook2.DefaultCurrency__c FROM sf.Pricebook2 WHERE sf.Pricebook2.Id = 'xxxxx'
[2019-12-02 12:43:54,368 MSK] DEBUG [salesforce-failover-facade,,,] org.teiid.COMMAND_LOG.SOURCE [Worker0_QueryProcessorQueue1]: SOURCE SRC COMMAND: endTime=2019-12-02 12:43:54.368 requestID=9MPiB/GOwB5f.0 sourceCommandID=2 executionID=1 txID=null modelName=sf translatorName=salesforce sessionID=9MPiB/GOwB5f principal=anonymous sourceCommand=[SELECT MSRP__c.Id, MSRP__c.IsActive__c, MSRP__c.Name, MSRP__c.PriceBook__c, MSRP__c.Price__c, MSRP__c.ProductCode__c, MSRP__c.ProductName__c, MSRP__c.Product__c, Product__r.Id, Product__r.Name, Product__r.Description FROM MSRP__c WHERE (MSRP__c.PriceBook__c = 'xxxx') AND ((MSRP__c.ProductCode__c IN(xxxxx)) AND (MSRP__c.IsActive__c = true))]
[2019-12-02 12:43:54,368 MSK] DEBUG [salesforce-failover-facade,,,] org.teiid.CONNECTOR [Worker1_QueryProcessorQueue2]: salesforce.9MPiB/GOwB5f.9MPiB/GOwB5f.0.3: Incoming Query: SELECT Pricebook2.DefaultCurrency__c FROM Pricebook2 WHERE Pricebook2.Id = 'xxxx'
[2019-12-02 12:43:54,368 MSK] DEBUG [salesforce-failover-facade,,,] org.teiid.COMMAND_LOG.SOURCE [Worker1_QueryProcessorQueue2]: SOURCE SRC COMMAND: endTime=2019-12-02 12:43:54.368 requestID=9MPiB/GOwB5f.0 sourceCommandID=3 executionID=2 txID=null modelName=sf translatorName=salesforce sessionID=9MPiB/GOwB5f principal=anonymous sourceCommand=[Using retrieve: Pricebook2.DefaultCurrency__c Pricebook2 [xxxx]]
{code}
But need to generate one. Because we have two relations in MSRP__c
was:
For this SQL we have wrong generated SOQL
{code}
select
price.Id,
price.IsActive__c,
price.name,
price.PriceBook__c,
book.DefaultCurrency__c,
price.Price__c,
price.ProductCode__c,
price.ProductName__c,
price.Product__c,
product.Id,
product.Name,
product.Description
from
MSRP__c as price
left outer join /*+ MAKEDEP */ Product2 as product on
price.Product__c = product.id
left outer join /*+ MAKEDEP */ Pricebook2 as book on
price.PriceBook__c = book.id
where
price.PriceBook__c =:priceBookId
and ProductCode__c in(
:productCodes
)
and IsActive__c = true"
{code}
{code}
START DATA SRC COMMAND: startTime=2019-12-02 12:43:54.368 requestID=9MPiB/GOwB5f.0 sourceCommandID=3 executionID=2 txID=null modelName=sf translatorName=salesforce sessionID=9MPiB/GOwB5f principal=anonymous sql=SELECT sf.Pricebook2.DefaultCurrency__c FROM sf.Pricebook2 WHERE sf.Pricebook2.Id = 'xxxxx'
[2019-12-02 12:43:54,368 MSK] DEBUG [salesforce-failover-facade,,,] org.teiid.COMMAND_LOG.SOURCE [Worker0_QueryProcessorQueue1]: SOURCE SRC COMMAND: endTime=2019-12-02 12:43:54.368 requestID=9MPiB/GOwB5f.0 sourceCommandID=2 executionID=1 txID=null modelName=sf translatorName=salesforce sessionID=9MPiB/GOwB5f principal=anonymous sourceCommand=[SELECT MSRP__c.Id, MSRP__c.IsActive__c, MSRP__c.Name, MSRP__c.PriceBook__c, MSRP__c.Price__c, MSRP__c.ProductCode__c, MSRP__c.ProductName__c, MSRP__c.Product__c, Product__r.Id, Product__r.Name, Product__r.Description FROM MSRP__c WHERE (MSRP__c.PriceBook__c = 'xxxx') AND ((MSRP__c.ProductCode__c IN(xxxxx)) AND (MSRP__c.IsActive__c = true))]
[2019-12-02 12:43:54,368 MSK] DEBUG [salesforce-failover-facade,,,] org.teiid.CONNECTOR [Worker1_QueryProcessorQueue2]: salesforce.9MPiB/GOwB5f.9MPiB/GOwB5f.0.3: Incoming Query: SELECT Pricebook2.DefaultCurrency__c FROM Pricebook2 WHERE Pricebook2.Id = 'xxxx'
[2019-12-02 12:43:54,368 MSK] DEBUG [salesforce-failover-facade,,,] org.teiid.COMMAND_LOG.SOURCE [Worker1_QueryProcessorQueue2]: SOURCE SRC COMMAND: endTime=2019-12-02 12:43:54.368 requestID=9MPiB/GOwB5f.0 sourceCommandID=3 executionID=2 txID=null modelName=sf translatorName=salesforce sessionID=9MPiB/GOwB5f principal=anonymous sourceCommand=[Using retrieve: Pricebook2.DefaultCurrency__c Pricebook2 [xxxx]]
{code}
But need to generate one.
> Need to properly generate SOQL for multiple nested joins
> --------------------------------------------------------
>
> Key: TEIID-5861
> URL: https://issues.jboss.org/browse/TEIID-5861
> Project: Teiid
> Issue Type: Enhancement
> Components: Salesforce Connector
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> For this SQL we have wrong generated SOQL
> {code}
> select
> price.Id,
> price.IsActive__c,
> price.name,
> price.PriceBook__c,
> book.DefaultCurrency__c,
> price.Price__c,
> price.ProductCode__c,
> price.ProductName__c,
> price.Product__c,
> product.Id,
> product.Name,
> product.Description
> from
> MSRP__c as price
> left outer join /*+ MAKEDEP */ Product2 as product on
> price.Product__c = product.id
> left outer join /*+ MAKEDEP */ Pricebook2 as book on
> price.PriceBook__c = book.id
> where
> price.PriceBook__c =:priceBookId
> and ProductCode__c in(
> :productCodes
> )
> and IsActive__c = true"
> {code}
> {code}
> START DATA SRC COMMAND: startTime=2019-12-02 12:43:54.368 requestID=9MPiB/GOwB5f.0 sourceCommandID=3 executionID=2 txID=null modelName=sf translatorName=salesforce sessionID=9MPiB/GOwB5f principal=anonymous sql=SELECT sf.Pricebook2.DefaultCurrency__c FROM sf.Pricebook2 WHERE sf.Pricebook2.Id = 'xxxxx'
> [2019-12-02 12:43:54,368 MSK] DEBUG [salesforce-failover-facade,,,] org.teiid.COMMAND_LOG.SOURCE [Worker0_QueryProcessorQueue1]: SOURCE SRC COMMAND: endTime=2019-12-02 12:43:54.368 requestID=9MPiB/GOwB5f.0 sourceCommandID=2 executionID=1 txID=null modelName=sf translatorName=salesforce sessionID=9MPiB/GOwB5f principal=anonymous sourceCommand=[SELECT MSRP__c.Id, MSRP__c.IsActive__c, MSRP__c.Name, MSRP__c.PriceBook__c, MSRP__c.Price__c, MSRP__c.ProductCode__c, MSRP__c.ProductName__c, MSRP__c.Product__c, Product__r.Id, Product__r.Name, Product__r.Description FROM MSRP__c WHERE (MSRP__c.PriceBook__c = 'xxxx') AND ((MSRP__c.ProductCode__c IN(xxxxx)) AND (MSRP__c.IsActive__c = true))]
> [2019-12-02 12:43:54,368 MSK] DEBUG [salesforce-failover-facade,,,] org.teiid.CONNECTOR [Worker1_QueryProcessorQueue2]: salesforce.9MPiB/GOwB5f.9MPiB/GOwB5f.0.3: Incoming Query: SELECT Pricebook2.DefaultCurrency__c FROM Pricebook2 WHERE Pricebook2.Id = 'xxxx'
> [2019-12-02 12:43:54,368 MSK] DEBUG [salesforce-failover-facade,,,] org.teiid.COMMAND_LOG.SOURCE [Worker1_QueryProcessorQueue2]: SOURCE SRC COMMAND: endTime=2019-12-02 12:43:54.368 requestID=9MPiB/GOwB5f.0 sourceCommandID=3 executionID=2 txID=null modelName=sf translatorName=salesforce sessionID=9MPiB/GOwB5f principal=anonymous sourceCommand=[Using retrieve: Pricebook2.DefaultCurrency__c Pricebook2 [xxxx]]
> {code}
> But need to generate one. Because we have two relations in MSRP__c
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (TEIID-5856) Teiid generate wrong request to salesforce
by Renat Eskenin (Jira)
[ https://issues.jboss.org/browse/TEIID-5856?page=com.atlassian.jira.plugin... ]
Renat Eskenin edited comment on TEIID-5856 at 12/3/19 2:50 AM:
---------------------------------------------------------------
References it is relations :)
It is true SOQL
SELECT Account.BillingCountry__c, Account.Name FROM Contact LIMIT 1
But in another SQL we have wrong SOQL. I did wrote example:
SQL (one level of nested join)
originalLicense.ReplacementLicenseID__c = replacementLicense.Id
It is relation ReplacementLicenseID__r
{code}
SELECT originalLicense.Id,originalLicense.Status__c,originalLicense.ReplacementLicenseID__c,originalLicense.LicenseId__c,originalLicense.vlic_Contract_Number__c,replacementLicense.LicenseId__c as replacementLicenseId ,replacementLicense.LicenseId__c as replacementLicenseLicenseId FROM Product_License__c originalLicense LEFT OUTER JOIN /*+ MAKEDEP */ Product_License__c replacementLicense ON originalLicense.ReplacementLicenseID__c = replacementLicense.Id where originalLicense.vlic_Contract_Number__c = :contractNumber
{code}
But generated SOQL have two separate requests:
{code}
[2019-11-28 08:24:03,575 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue0]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.2: Executing Query: SELECT Product_License__c.ReplacementLicenseID__c, Product_License__c.Id, Product_License__c.Status__c, Product_License__c.LicenseId__c, Product_License__c.vlic_Contract_Number__c FROM Product_License__c WHERE Product_License__c.vlic_Contract_Number__c = '11111aaaaa'
{code}
Second real request
{code}
[2019-11-28 08:24:04,025 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue1]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.3: Incoming Query: SELECT Product_License__c.Id, Product_License__c.LicenseId__c FROM Product_License__c WHERE Product_License__c.Id = 'asdasdasdadasdasd
{code}
It is "wrong plan", but now i understand to this true plan but wrong generated SOQL by salesforce translator.
I created tasks
https://issues.jboss.org/browse/TEIID-5860
https://issues.jboss.org/browse/TEIID-5861
Thank you for reply to my questions! :)
was (Author: i3draven):
References it is relations :)
It is true SOQL
SELECT Account.BillingCountry__c, Account.Name FROM Contact LIMIT 1
But in another SQL we have wrong SOQL. I did wrote example:
SQL (one level of nested join)
originalLicense.ReplacementLicenseID__c = replacementLicense.Id
It is relation ReplacementLicenseID__r
{code}
SELECT originalLicense.Id,originalLicense.Status__c,originalLicense.ReplacementLicenseID__c,originalLicense.LicenseId__c,originalLicense.vlic_Contract_Number__c,replacementLicense.LicenseId__c as replacementLicenseId ,replacementLicense.LicenseId__c as replacementLicenseLicenseId FROM Product_License__c originalLicense LEFT OUTER JOIN /*+ MAKEDEP */ Product_License__c replacementLicense ON originalLicense.ReplacementLicenseID__c = replacementLicense.Id where originalLicense.vlic_Contract_Number__c = :contractNumber
{code}
But generated SOQL have two separate requests:
{code}
[2019-11-28 08:24:03,575 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue0]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.2: Executing Query: SELECT Product_License__c.ReplacementLicenseID__c, Product_License__c.Id, Product_License__c.Status__c, Product_License__c.LicenseId__c, Product_License__c.vlic_Contract_Number__c FROM Product_License__c WHERE Product_License__c.vlic_Contract_Number__c = '11111aaaaa'
{code}
Second real request
{code}
[2019-11-28 08:24:04,025 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue1]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.3: Incoming Query: SELECT Product_License__c.Id, Product_License__c.LicenseId__c FROM Product_License__c WHERE Product_License__c.Id = 'asdasdasdadasdasd
{code}
It is "wrong plan", but now i understand to this true plan but wrong generated SOQL by salesforce translator.
I created tasks
https://issues.jboss.org/browse/TEIID-5860
https://issues.jboss.org/browse/TEIID-5861
> Teiid generate wrong request to salesforce
> ------------------------------------------
>
> Key: TEIID-5856
> URL: https://issues.jboss.org/browse/TEIID-5856
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Environment: spring-boot teiid salesforce-connector
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> When i call request to salesforce teiid get very long wrong request and then OOM, because teiid request all data in salesforce object.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (TEIID-5856) Teiid generate wrong request to salesforce
by Renat Eskenin (Jira)
[ https://issues.jboss.org/browse/TEIID-5856?page=com.atlassian.jira.plugin... ]
Renat Eskenin edited comment on TEIID-5856 at 12/3/19 2:50 AM:
---------------------------------------------------------------
References it is relations :)
It is true SOQL
SELECT Account.BillingCountry__c, Account.Name FROM Contact LIMIT 1
But in another SQL we have wrong SOQL. I did wrote example:
SQL (one level of nested join)
originalLicense.ReplacementLicenseID__c = replacementLicense.Id
It is relation ReplacementLicenseID__r
{code}
SELECT originalLicense.Id,originalLicense.Status__c,originalLicense.ReplacementLicenseID__c,originalLicense.LicenseId__c,originalLicense.vlic_Contract_Number__c,replacementLicense.LicenseId__c as replacementLicenseId ,replacementLicense.LicenseId__c as replacementLicenseLicenseId FROM Product_License__c originalLicense LEFT OUTER JOIN /*+ MAKEDEP */ Product_License__c replacementLicense ON originalLicense.ReplacementLicenseID__c = replacementLicense.Id where originalLicense.vlic_Contract_Number__c = :contractNumber
{code}
But generated SOQL have two separate requests:
{code}
[2019-11-28 08:24:03,575 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue0]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.2: Executing Query: SELECT Product_License__c.ReplacementLicenseID__c, Product_License__c.Id, Product_License__c.Status__c, Product_License__c.LicenseId__c, Product_License__c.vlic_Contract_Number__c FROM Product_License__c WHERE Product_License__c.vlic_Contract_Number__c = '11111aaaaa'
{code}
Second real request
{code}
[2019-11-28 08:24:04,025 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue1]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.3: Incoming Query: SELECT Product_License__c.Id, Product_License__c.LicenseId__c FROM Product_License__c WHERE Product_License__c.Id = 'asdasdasdadasdasd
{code}
It is "wrong plan", but now i understand to this true plan but wrong generated SOQL by salesforce translator.
I created tasks
https://issues.jboss.org/browse/TEIID-5860
https://issues.jboss.org/browse/TEIID-5861
was (Author: i3draven):
References it is relations :)
It is true SOQL
SELECT Account.BillingCountry__c, Account.Name FROM Contact LIMIT 1
But in another SQL we have wrong SOQL. I did wrote example:
SQL (one level of nested join)
originalLicense.ReplacementLicenseID__c = replacementLicense.Id
It is relation ReplacementLicenseID__r
{code}
SELECT originalLicense.Id,originalLicense.Status__c,originalLicense.ReplacementLicenseID__c,originalLicense.LicenseId__c,originalLicense.vlic_Contract_Number__c,replacementLicense.LicenseId__c as replacementLicenseId ,replacementLicense.LicenseId__c as replacementLicenseLicenseId FROM Product_License__c originalLicense LEFT OUTER JOIN /*+ MAKEDEP */ Product_License__c replacementLicense ON originalLicense.ReplacementLicenseID__c = replacementLicense.Id where originalLicense.vlic_Contract_Number__c = :contractNumber
{code}
But generated SOQL have two separate requests:
{code}
[2019-11-28 08:24:03,575 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue0]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.2: Executing Query: SELECT Product_License__c.ReplacementLicenseID__c, Product_License__c.Id, Product_License__c.Status__c, Product_License__c.LicenseId__c, Product_License__c.vlic_Contract_Number__c FROM Product_License__c WHERE Product_License__c.vlic_Contract_Number__c = '11111aaaaa'
{code}
Second real request
{code}
[2019-11-28 08:24:04,025 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue1]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.3: Incoming Query: SELECT Product_License__c.Id, Product_License__c.LicenseId__c FROM Product_License__c WHERE Product_License__c.Id = 'asdasdasdadasdasd
{code}
It is "wrong plan", but now i understand to this true plan but wrong generated SOQL by salesforce translator.
I created tasks
https://issues.jboss.org/browse/TEIID-5860
> Teiid generate wrong request to salesforce
> ------------------------------------------
>
> Key: TEIID-5856
> URL: https://issues.jboss.org/browse/TEIID-5856
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Environment: spring-boot teiid salesforce-connector
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> When i call request to salesforce teiid get very long wrong request and then OOM, because teiid request all data in salesforce object.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (TEIID-5861) Need to properly generate SOQL for multiple nested joins
by Renat Eskenin (Jira)
Renat Eskenin created TEIID-5861:
------------------------------------
Summary: Need to properly generate SOQL for multiple nested joins
Key: TEIID-5861
URL: https://issues.jboss.org/browse/TEIID-5861
Project: Teiid
Issue Type: Enhancement
Components: Salesforce Connector
Reporter: Renat Eskenin
Assignee: Steven Hawkins
For this SQL we have wrong generated SOQL
{code}
select
price.Id,
price.IsActive__c,
price.name,
price.PriceBook__c,
book.DefaultCurrency__c,
price.Price__c,
price.ProductCode__c,
price.ProductName__c,
price.Product__c,
product.Id,
product.Name,
product.Description
from
MSRP__c as price
left outer join /*+ MAKEDEP */ Product2 as product on
price.Product__c = product.id
left outer join /*+ MAKEDEP */ Pricebook2 as book on
price.PriceBook__c = book.id
where
price.PriceBook__c =:priceBookId
and ProductCode__c in(
:productCodes
)
and IsActive__c = true"
{code}
{code}
START DATA SRC COMMAND: startTime=2019-12-02 12:43:54.368 requestID=9MPiB/GOwB5f.0 sourceCommandID=3 executionID=2 txID=null modelName=sf translatorName=salesforce sessionID=9MPiB/GOwB5f principal=anonymous sql=SELECT sf.Pricebook2.DefaultCurrency__c FROM sf.Pricebook2 WHERE sf.Pricebook2.Id = 'xxxxx'
[2019-12-02 12:43:54,368 MSK] DEBUG [salesforce-failover-facade,,,] org.teiid.COMMAND_LOG.SOURCE [Worker0_QueryProcessorQueue1]: SOURCE SRC COMMAND: endTime=2019-12-02 12:43:54.368 requestID=9MPiB/GOwB5f.0 sourceCommandID=2 executionID=1 txID=null modelName=sf translatorName=salesforce sessionID=9MPiB/GOwB5f principal=anonymous sourceCommand=[SELECT MSRP__c.Id, MSRP__c.IsActive__c, MSRP__c.Name, MSRP__c.PriceBook__c, MSRP__c.Price__c, MSRP__c.ProductCode__c, MSRP__c.ProductName__c, MSRP__c.Product__c, Product__r.Id, Product__r.Name, Product__r.Description FROM MSRP__c WHERE (MSRP__c.PriceBook__c = 'xxxx') AND ((MSRP__c.ProductCode__c IN(xxxxx)) AND (MSRP__c.IsActive__c = true))]
[2019-12-02 12:43:54,368 MSK] DEBUG [salesforce-failover-facade,,,] org.teiid.CONNECTOR [Worker1_QueryProcessorQueue2]: salesforce.9MPiB/GOwB5f.9MPiB/GOwB5f.0.3: Incoming Query: SELECT Pricebook2.DefaultCurrency__c FROM Pricebook2 WHERE Pricebook2.Id = 'xxxx'
[2019-12-02 12:43:54,368 MSK] DEBUG [salesforce-failover-facade,,,] org.teiid.COMMAND_LOG.SOURCE [Worker1_QueryProcessorQueue2]: SOURCE SRC COMMAND: endTime=2019-12-02 12:43:54.368 requestID=9MPiB/GOwB5f.0 sourceCommandID=3 executionID=2 txID=null modelName=sf translatorName=salesforce sessionID=9MPiB/GOwB5f principal=anonymous sourceCommand=[Using retrieve: Pricebook2.DefaultCurrency__c Pricebook2 [xxxx]]
{code}
But need to generate one.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (TEIID-5856) Teiid generate wrong request to salesforce
by Renat Eskenin (Jira)
[ https://issues.jboss.org/browse/TEIID-5856?page=com.atlassian.jira.plugin... ]
Renat Eskenin edited comment on TEIID-5856 at 12/3/19 2:48 AM:
---------------------------------------------------------------
References it is relations :)
It is true SOQL
SELECT Account.BillingCountry__c, Account.Name FROM Contact LIMIT 1
But in another SQL we have wrong SOQL. I did wrote example:
SQL (one level of nested join)
originalLicense.ReplacementLicenseID__c = replacementLicense.Id
It is relation ReplacementLicenseID__r
{code}
SELECT originalLicense.Id,originalLicense.Status__c,originalLicense.ReplacementLicenseID__c,originalLicense.LicenseId__c,originalLicense.vlic_Contract_Number__c,replacementLicense.LicenseId__c as replacementLicenseId ,replacementLicense.LicenseId__c as replacementLicenseLicenseId FROM Product_License__c originalLicense LEFT OUTER JOIN /*+ MAKEDEP */ Product_License__c replacementLicense ON originalLicense.ReplacementLicenseID__c = replacementLicense.Id where originalLicense.vlic_Contract_Number__c = :contractNumber
{code}
But generated SOQL have two separate requests:
{code}
[2019-11-28 08:24:03,575 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue0]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.2: Executing Query: SELECT Product_License__c.ReplacementLicenseID__c, Product_License__c.Id, Product_License__c.Status__c, Product_License__c.LicenseId__c, Product_License__c.vlic_Contract_Number__c FROM Product_License__c WHERE Product_License__c.vlic_Contract_Number__c = '11111aaaaa'
{code}
Second real request
{code}
[2019-11-28 08:24:04,025 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue1]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.3: Incoming Query: SELECT Product_License__c.Id, Product_License__c.LicenseId__c FROM Product_License__c WHERE Product_License__c.Id = 'asdasdasdadasdasd
{code}
It is "wrong plan", but now i understand to this true plan but wrong generated SOQL by salesforce translator.
I created tasks
https://issues.jboss.org/browse/TEIID-5860
was (Author: i3draven):
References it is relations :)
It is true SOQL
SELECT Account.BillingCountry__c, Account.Name FROM Contact LIMIT 1
But in another SQL we have wrong SOQL. I did wrote example:
SQL (one level of nested join)
originalLicense.ReplacementLicenseID__c = replacementLicense.Id
It is relation ReplacementLicenseID__r
{code}
SELECT originalLicense.Id,originalLicense.Status__c,originalLicense.ReplacementLicenseID__c,originalLicense.LicenseId__c,originalLicense.vlic_Contract_Number__c,replacementLicense.LicenseId__c as replacementLicenseId ,replacementLicense.LicenseId__c as replacementLicenseLicenseId FROM Product_License__c originalLicense LEFT OUTER JOIN /*+ MAKEDEP */ Product_License__c replacementLicense ON originalLicense.ReplacementLicenseID__c = replacementLicense.Id where originalLicense.vlic_Contract_Number__c = :contractNumber
{code}
But generated SOQL have two separate requests:
{code}
[2019-11-28 08:24:03,575 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue0]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.2: Executing Query: SELECT Product_License__c.ReplacementLicenseID__c, Product_License__c.Id, Product_License__c.Status__c, Product_License__c.LicenseId__c, Product_License__c.vlic_Contract_Number__c FROM Product_License__c WHERE Product_License__c.vlic_Contract_Number__c = '11111aaaaa'
{code}
Second real request
{code}
[2019-11-28 08:24:04,025 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue1]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.3: Incoming Query: SELECT Product_License__c.Id, Product_License__c.LicenseId__c FROM Product_License__c WHERE Product_License__c.Id = 'asdasdasdadasdasd
{code}
It is "wrong plan", but now i understand to this true plan but wrong generated SOQL by salesforce translator.
> Teiid generate wrong request to salesforce
> ------------------------------------------
>
> Key: TEIID-5856
> URL: https://issues.jboss.org/browse/TEIID-5856
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Environment: spring-boot teiid salesforce-connector
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> When i call request to salesforce teiid get very long wrong request and then OOM, because teiid request all data in salesforce object.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (TEIID-5860) Need to properly generate SOQL for self joins
by Renat Eskenin (Jira)
Renat Eskenin created TEIID-5860:
------------------------------------
Summary: Need to properly generate SOQL for self joins
Key: TEIID-5860
URL: https://issues.jboss.org/browse/TEIID-5860
Project: Teiid
Issue Type: Enhancement
Components: Salesforce Connector
Reporter: Renat Eskenin
Assignee: Steven Hawkins
In this query
{code}
SELECT originalLicense.Id,originalLicense.Status__c,originalLicense.ReplacementLicenseID__c,originalLicense.LicenseId__c,originalLicense.vlic_Contract_Number__c,replacementLicense.LicenseId__c as replacementLicenseId ,replacementLicense.LicenseId__c as replacementLicenseLicenseId FROM Product_License__c originalLicense LEFT OUTER JOIN /*+ MAKEDEP */ Product_License__c replacementLicense ON originalLicense.ReplacementLicenseID__c = replacementLicense.Id where originalLicense.vlic_Contract_Number__c = :contractNumber
{code}
We have wrong two requests to salesforce but need one.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years
[JBoss JIRA] (TEIID-5856) Teiid generate wrong request to salesforce
by Renat Eskenin (Jira)
[ https://issues.jboss.org/browse/TEIID-5856?page=com.atlassian.jira.plugin... ]
Renat Eskenin commented on TEIID-5856:
--------------------------------------
References it is relations :)
It is true SOQL
SELECT Account.BillingCountry__c, Account.Name FROM Contact LIMIT 1
But in another SQL we have wrong SOQL. I did wrote example:
SQL (one level of nested join)
originalLicense.ReplacementLicenseID__c = replacementLicense.Id
It is relation ReplacementLicenseID__r
{code}
SELECT originalLicense.Id,originalLicense.Status__c,originalLicense.ReplacementLicenseID__c,originalLicense.LicenseId__c,originalLicense.vlic_Contract_Number__c,replacementLicense.LicenseId__c as replacementLicenseId ,replacementLicense.LicenseId__c as replacementLicenseLicenseId FROM Product_License__c originalLicense LEFT OUTER JOIN /*+ MAKEDEP */ Product_License__c replacementLicense ON originalLicense.ReplacementLicenseID__c = replacementLicense.Id where originalLicense.vlic_Contract_Number__c = :contractNumber
{code}
But generated SOQL have two separate requests:
{code}
[2019-11-28 08:24:03,575 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue0]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.2: Executing Query: SELECT Product_License__c.ReplacementLicenseID__c, Product_License__c.Id, Product_License__c.Status__c, Product_License__c.LicenseId__c, Product_License__c.vlic_Contract_Number__c FROM Product_License__c WHERE Product_License__c.vlic_Contract_Number__c = '11111aaaaa'
{code}
Second real request
{code}
[2019-11-28 08:24:04,025 GMT] DEBUG [salesforce-failover-facade,,,] [salesforce-failover-facade-56f467f5f8-q8mml] org.teiid.CONNECTOR [Worker0_QueryProcessorQueue1]: salesforce.87EGAL91ieOh.87EGAL91ieOh.0.3: Incoming Query: SELECT Product_License__c.Id, Product_License__c.LicenseId__c FROM Product_License__c WHERE Product_License__c.Id = 'asdasdasdadasdasd
{code}
It is "wrong plan", but now i understand to this true plan but wrong generated SOQL by salesforce translator.
> Teiid generate wrong request to salesforce
> ------------------------------------------
>
> Key: TEIID-5856
> URL: https://issues.jboss.org/browse/TEIID-5856
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Environment: spring-boot teiid salesforce-connector
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> When i call request to salesforce teiid get very long wrong request and then OOM, because teiid request all data in salesforce object.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years