turbot / steampipe-plugin-salesforce

Use SQL to instantly query Salesforce resources. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/salesforce
Apache License 2.0
9 stars 6 forks source link

Implement dynamic query generation based on requested columns for API #52

Closed bigdatasourav closed 3 months ago

bigdatasourav commented 6 months ago

Example query results

Results # Before implementation - Requested query - ``` select id, name from salesforce_account; ``` Actual query in the API - ``` 2024-04-09 04:34:31.904 UTC query::="SELECT Id, Name, AnnualRevenue, Industry, OwnerId, Type, AccountSource, CleanStatus, CreatedById, CreatedDate, Description, IsDeleted, LastModifiedById, LastModifiedDate, NumberOfEmployees, Ownership, Phone, Rating, Sic, TickerSymbol, Tradestyle, Website, BillingAddress, ShippingAddress, MasterRecordId, ParentId, Fax, AccountNumber, PhotoUrl, Site, SystemModstamp, LastActivityDate, LastViewedDate, LastReferencedDate, Jigsaw, JigsawCompanyId, DunsNumber, NaicsCode, NaicsDesc, YearStarted, SicDesc, DandbCompanyId, OperatingHoursId, customerpriority__c, sla__c, active__c, numberoflocations__c, upsellopportunity__c, slaserialnumber__c, slaexpirationdate__c FROM Account" ``` # After implementation Requested query - ``` select id, name from salesforce_account; select id, name from salesforce_account where annual_revenue = 350000000; ``` Actual query in the API - ``` 2024-04-09 06:21:24.602 UTC: query::="SELECT Id, Name FROM Account" 2024-04-09 06:22:08.596 UTC: query::="SELECT Id, Name, AnnualRevenue FROM Account where AnnualRevenue = 350000000.000000" ``` ``` > select id, name from salesforce_account; +--------------------+-------------------------------------+ | id | name | +--------------------+-------------------------------------+ | 0012w00001R7ig9AAB | Edge Communications | | 0012w00001R7igKAAR | sForce | | 0012w00001QsnqQAAR | Sample Account for Entitlements | | 0012w00001R7igJAAR | GenePoint | | 0012w00001R7igDAAR | Grand Hotels & Resorts Ltd | | 0012w00001R7igAAAR | Burlington Textiles Corp of America | | 0012w00001R7igFAAR | Express Logistics and Transport | | 0012w00001R7igGAAR | University of Arizona | | 0012w00001R7igEAAR | United Oil & Gas Corp. | | 0012w00001R7igHAAR | United Oil & Gas, UK | | 0012w00001R7igBAAR | Pyramid Construction Inc. | | 0012w00001R7igIAAR | United Oil & Gas, Singapore | | 0012w00001R7igCAAR | Dickenson plc | +--------------------+-------------------------------------+ > select id, name from salesforce_account where annual_revenue = 350000000 +--------------------+-------------------------------------+ | id | name | +--------------------+-------------------------------------+ | 0012w00001R7igAAAR | Burlington Textiles Corp of America | +--------------------+-------------------------------------+ ```
github-actions[bot] commented 4 months ago

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] commented 3 months ago

This PR was closed because it has been stalled for 90 days with no activity.