Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script for Limited SFDC data load

Hi,

I would like to load SFDC data (I have the connector working) but because the data sets are so large I need to limit the data loaded e.g. get only SFDC opportunities created in 2015.  I was trying to use the data connector wizard but there isn't an option to filter within it.  Might someone be able to share a simple sample SFDC data load script that uses filter to limit data load by date to get me going?  I have a feeling that this is accomplished with SQL or SOQL but I'm not well versed in these queries...

I today stage my SFDC data in excel and it is too cumbersome for refreshes.

Thank you in advance,
Pia

3 Replies
marcus_sommer

I don't know these connector but assume it will be based on sql - therefore should your query look like this:

table:

SQL Select Field1, Field2, Field3 From YourSFDC where year(created_date) = 2015;

This meant you need to manually adjust the output from the wizard to the above where-clause (you might need to adjust the fieldname for your date-field, too or if there is a year-field available you could use this).

- Marcus

Not applicable
Author

Thank you.  My issue was pretty simple, didn't know where to place the "where" and how to define it.  Sample script looks like this.  Will try the year(CreatedDate) next as that seems simpler.

LIB CONNECT TO 'Salesforce_BULK';

LOAD Id,

Status,

    CreatedDate;

SELECT Id,

Status,

CreatedDate

FROM Lead WHERE CreatedDate > 2015-01-01T00:00:01Z;

DataWrangler
Former Employee
Former Employee

Hi Pia,

The Open Source Dashboard for Salesforce (OSD4SF) includes a working example of date filtering in SQL queries against SalesForce.

The entire dashboard, including functional ETL and Dashboard UI components, is posted at the following GitHub link: https://github.com/qlikperf/OSD4SF/blob/master/README.md

The  works OSD4SF works with both of the top 2 BI products, QlikView and Qlik Sense.