I am trying to extract data from Salesforces into Tableau Prep using a simple SOQL query,
SELECT Id,
Amount,
CloseDate,
npsp__Primary_Contact__r.npo02__FirstCloseDate__c
FROM Opportunity
WHERE
CloseDate = THIS_YEAR
AND Id ='1234'
When I run it in Salesforce Dev console I get one record, when i run it in Tableau Prep I get 2 records Id, Amount & CloseDate are identical while one row of npsp__Primary_Contact__r.npo02__FirstCloseDate__c is blank and the other has data in it.
Salesforce Dev is correct, this is a simplified version of a larger code on a database with 50m records and this issues affects multiple columns and Tableau is trying to create 200m rows. Can anyone offer some tips to debug this?
I am trying to extract data from Salesforces into Tableau Prep using a simple SOQL query,
SELECT Id,
Amount,
CloseDate,
npsp__Primary_Contact__r.npo02__FirstCloseDate__c
FROM Opportunity
WHERE
CloseDate = THIS_YEAR
AND Id ='1234'
When I run it in Salesforce Dev console I get one record, when i run it in Tableau Prep I get 2 records Id, Amount & CloseDate are identical while one row of npsp__Primary_Contact__r.npo02__FirstCloseDate__c is blank and the other has data in it.
Salesforce Dev is correct, this is a simplified version of a larger code on a database with 50m records and this issues affects multiple columns and Tableau is trying to create 200m rows. Can anyone offer some tips to debug this?
Share Improve this question edited Mar 10 at 8:26 Max_Stone asked Mar 3 at 9:05 Max_StoneMax_Stone 6584 silver badges13 bronze badges2 Answers
Reset to default 0The best approach here would be to enforce the Identify Duplicate Rows option in a "Clean" step right after you use the custom SQl node
the Is Duplicate Row? column will identify the duplicates for you and you can filter them
Try using Tableau Prep or even Tableau Desktop to generate the query to see if the behavior changes.
Normally, its better to reserve custom SQL for circumstances that really require it - such as calling a database specific function. That's more flexible and also allows Tableau to optimize the SQL.
You don't need custom SQL for this query, so it would be a good test to see how it behaves to let Tableau generate the query. Just connect to the table, and put your close date and Id in the data source filters if you really need them filtered at this early stage, or filter them with an output step or in Tableau Desktop's filter shelf.
I'd say there is a good chance this eliminates the duplicates - but if not, at least you'll have a second data point to inform your investigation.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745102546a4611362.html
评论列表(0条)