Started by Jofar ArcharNov 10, 2021

Open
How to do Salesforce SOQL query to only select objects which have record counts greater than zero?

2 VIEWES 1 LIKES 1 DISLIKES SHARE
1 LIKES 1 DISLIKES 2 VIEWES SHARE

I am trying to do each day copy (each day photo) of all of the salesforce objects the usage of azure information manufacturing unit (ADF) "reproduction" interest into an azure data lake via first the usage of a lookup query pastime (soql as shown under) and then doing a foreach interest for the list of items again from this query:

SELECT qualifiedapiname 
FROM EntityDefinition 
WHERE IsQueryable = true 
  AND IsRetrieveable = true 
  AND IsDeprecatedAndHidden = false
LIMIT 2000

But, this query also returns objects which haven't any (zero) information in any respect and that I need to bypass them. How are we able to?

Is there any area/assets metadata in salesforce's entity definition that can tell if the object has any facts in it or if it's blank, something like "isblank = authentic/false"?

As per this link:- soql does not permit matter() on entity definition object, therefore it is now not viable to find if a sure object (qualifiedapiname) has any data in it from the square question:https://developer.Salesforce.Com/docs/atlas.En-us.Api_tooling.Meta/api_tooling/reference_objects_soql_limits.Htm#subject matter-name

Running this on adfv2 with batch depending on fifty; automobile diu, and diploma of parallelism = 32. Presently, all these sfdc objects have a less wide variety of records; however sooner or later whilst it starts developing - might re-design this pipeline, in any case, to segregate small objects as every day full copy and massive sfdc items with a one-time load after which incremental hundreds using both watermark table and/or max final changed date/time method.

0 Replies

You must be Logged in to reply
Techiio

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

facebooklinkdeintwitter

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Copyright techiio.com @2020 Kolkata, India
made with by Abhishek & Priyanka Jalan
Copyright techiio.com @2020
made with by Abhishek & Priyanka Jalan