Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query translated weird with RushTI #88

Open
SabrinaDC opened this issue Oct 31, 2024 · 1 comment
Open

Query translated weird with RushTI #88

SabrinaDC opened this issue Oct 31, 2024 · 1 comment

Comments

@SabrinaDC
Copy link

RushTi is doing something strange with the query I pass on. It throws errors with the process }atmosphere.run.salesforce.to.tm1.metadata

This is what we pass in the task

id="1" predecessors="" require_predecessor_success="" instance="TIMEWISE" process="}bedrock.cube.view.create" pLogOutput="0" pStrictErrorHandling="0" pCube="}ElementAttributes_}New_Account" pView="Src_SF" pFilter="" pSuppressZero="1" pSuppressConsol="1" pSuppressRules="1" pSuppressConsolStrings="-1" pDimDelim="&" pEleDelim="+" pTemp="0" pSubN="0"
id="2" predecessors="1" require_predecessor_success="1" instance="TIMEWISE" process="}atmosphere.run.tm1.to.salesforce" pTm1Connection="timewise" pSalesforceConnection="salesforce-dev" pSalesforceObject="Account" pSourceCube="}ElementAttributes_}New_Account" pSourceView="Src_SF" pSalesforceId="c2g__CODAExternalId__c" pRecordsOnRows="True" pCreateNewRecords="True" pElementAttributeSwap="" pHeaderAttributeSwap="" pRenameHeaders="" pStaticColumns="" pColumnOrder="" pTransformationOrder="" pSyncBackId="{"}New_Account":"Id"}" pZeroAsValue="False"
id="3" predecessors="2" require_predecessor_success="1" instance="TIMEWISE" process="}bedrock.server.wait" pLogOutput=0 pStrictErrorHandling=0 pWaitSec=60
id="4" predecessors="3" require_predecessor_success="1" instance="TIMEWISE" process="}atmosphere.run.salesforce.to.tm1.metadata" pTm1Connection="timewise" pSalesforceConnection="salesforce-dev" pQuery="SELECT Id,IsDeleted,MasterRecordId,Name,RecordTypeId,ParentId,BillingStreet,BillingCity,BillingState,BillingPostalCode,BillingCountry,BillingLatitude,BillingLongitude,BillingGeocodeAccuracy,BillingAddress,ShippingStreet,ShippingCity,ShippingState,ShippingPostalCode,ShippingCountry,ShippingLatitude,ShippingLongitude,ShippingGeocodeAccuracy,ShippingAddress,Phone,Fax,AccountNumber,Website,PhotoUrl,Industry,AnnualRevenue,NumberOfEmployees,Description,CurrencyIsoCode,OwnerId,CreatedDate,CreatedById,LastModifiedDate,LastModifiedById,SystemModstamp,LastActivityDate,LastViewedDate,LastReferencedDate,JigsawCompanyId,Region__c,Reference__c,Active__c,Cleansed__c,Source_System_Code__c,Data_Source__c,Country__c,c2g__CODAAccountTradingCurrency__c,Passport_Advantage_Site_Number__c,Financial_Year__c,Default_Dim_1__c,Current_Status__c,c2g__CODAAccountsPayableControl__c,Company_Entity__c,Company_Sector__c,c2g__CODAAccountsReceivableControl__c,c2g__CODAAllowDeleteInUse__c,Existing_DW__c,Existing_Analytical_Systems__c,Existing_Tranactional_Systems__c,Category_of_Interest__c,Account_Has_TM1__c,Account_Has_Pulse__c,Account_Has_CDM__c,Existing_Cubewise_Software__c,No_Of_Employees__c,Last_Statement_Date__c,c2g__CODABankAccountName__c,c2g__CODABankAccountNumber__c,c2g__CODABankAccountReference__c,c2g__CODABankCity__c,c2g__CODABankCountry__c,c2g__CODABankFax__c,Services_FY08__c,Services_FY09__c,Services_FY10__c,Services_FY11__c,Services_FY12__c,Services_FY13__c,Services_FY14__c,Services_FY15__c,Last_Called_Called__c,Last_Activity_Meeting__c,Last_Activity_Email__c,Last_Qualification_Date__c,Sub_Industry__c,c2g__CODABankIBANNumber__c,c2g__CODABankName__c,c2g__CODABankPhone__c,c2g__CODABankSWIFTNumber__c,c2g__CODABankSortCode__c,c2g__CODABankStateProvince__c,c2g__CODABankStreet__c,c2g__CODABankZipPostalCode__c,c2g__CODABaseDate1__c,c2g__CODABaseDate2__c,c2g__CODABaseDate3__c,c2g__CODABaseDate4__c,c2g__CODABillingAddressIsValid__c,c2g__CODABillingMethod__c,c2g__CODACreditAgency__c,c2g__CODACreditLimitEnabled__c,c2g__CODACreditLimitReviewed__c,c2g__CODACreditLimit__c,c2g__CODACreditManager__c,c2g__CODACreditRatingReviewed__c,c2g__CODACreditRating__c,c2g__CODACreditReference__c,c2g__CODACreditStatus__c,c2g__CODADaysOffset1__c,c2g__CODADaysOffset2__c,c2g__CODADaysOffset3__c,c2g__CODADaysOffset4__c,c2g__CODADefaultExpenseAccount__c,c2g__CODADescription1__c,c2g__CODADescription2__c,c2g__CODADescription3__c,c2g__CODADescription4__c,c2g__CODADimension1__c,c2g__CODADimension2__c,c2g__CODADimension3__c,c2g__CODADimension4__c,c2g__CODADiscount1__c,c2g__CODADiscount2__c,c2g__CODADiscount3__c,c2g__CODADiscount4__c,c2g__CODAECCountryCode__c,c2g__CODAEntityUseCode__c,c2g__CODAExemptionCertificate__c,c2g__CODAExternalId__c,c2g__CODAFederallyReportable1099__c,c2g__CODAFinanceContact__c,c2g__CODAIncomeTaxType__c,c2g__CODAInputVATCode__c,c2g__CODAIntercompanyAccount__c,c2g__CODAInvoiceEmail__c,c2g__CODAMergeId__c,c2g__CODAOutputVATCode__c,c2g__CODAPaymentMethod__c,c2g__CODAReportingCode__c,c2g__CODASalesTaxStatus__c,c2g__CODAShippingAddressIsValid__c,c2g__CODATaxCalculationMethod__c,c2g__CODATaxCode1__c,c2g__CODATaxCode2__c,c2g__CODATaxCode3__c,c2g__CODATaxpayerIdentificationNumber__c,c2g__CODAUnitOfWork__c,c2g__CODAVATRegistrationNumber__c,c2g__CODAVATStatus__c,c2g__CODAValidatedBillingCity__c,c2g__CODAValidatedBillingCountry__c,c2g__CODAValidatedBillingPostCode__c,c2g__CODAValidatedBillingState__c,c2g__CODAValidatedBillingStreet__c,c2g__CODAValidatedShippingCity__c,c2g__CODAValidatedShippingCountry__c,c2g__CODAValidatedShippingPostCode__c,c2g__CODAValidatedShippingState__c,c2g__CODAValidatedShippingStreet__c,fferpcore__ExemptionCertificate__c,ffbf__AccountParticulars__c,ffbf__BankBIC__c,ffbf__PaymentCode__c,ffbf__PaymentCountryISO__c,ffbf__PaymentPriority__c,ffbf__PaymentRoutingMethod__c,CustomReference__c,Hold_Correspondences__c,LID__LinkedIn_Company_Id__c,Customer_Class__c,Customer_Potential__c,Currency_Difference__c,Account_Type__c,fferpcore__IsBillingAddressValidated__c,fferpcore__IsShippingAddressValidated__c,fferpcore__OutputVatCode__c,fferpcore__SalesTaxStatus__c,fferpcore__TaxCode1__c,fferpcore__TaxCode2__c,fferpcore__TaxCode3__c,fferpcore__TaxCountryCode__c,fferpcore__ValidatedBillingCity__c,fferpcore__ValidatedBillingCountry__c,fferpcore__ValidatedBillingPostalCode__c,fferpcore__ValidatedBillingState__c,fferpcore__ValidatedBillingStreet__c,fferpcore__ValidatedShippingCity__c,fferpcore__ValidatedShippingCountry__c,fferpcore__ValidatedShippingPostalCode__c,fferpcore__ValidatedShippingState__c,fferpcore__ValidatedShippingStreet__c,fferpcore__VatRegistrationNumber__c,fferpcore__VatStatus__c,Payment_Terms__c,c2g__AverageDaysToPay__c,c2g__CollectionsOnHoldReason__c,c2g__CollectionsOnHold__c,c2g__DaysSalesOutstanding__c,Mavenlink_Vendor_Alias__c,Account_balance_Report_Company__c,AP_Correspondence_Email__c,TM1_Version__c,Company_Name__c,Company_Name_Selected__c,Invoice_Email_2__c,Apliqo_Business_Partner__c,ILMT_Required__c,ILMT_Installed__c,TM1Py_Used__c,TM1Py_Use_Case__c,Unique_Account_Code__c,Billing_Address_2__c,Billing_Address_3__c,Shipping_Address_2__c,Shipping_Address_3__c,Intercompany_Company__c,Number_of_TM1_Users__c,Account_Summary__c,Qualified_Demand__c,Primary_Contact__c,Value_Chain__c FROM Account WHERE c2g__CODAExternalId__c = "20241031092120" " pElementAttributeSwap="" pHeaderAttributeSwap="" pRenameHeaders="" pStaticColumns="" pColumnOrder="" pUnwind="True" pTarget="Account_SF_New_Account_SFTest"

If I run it with cmd, this is what you see:

C:\Windows\system32>"D:\Program Files\Python\python.exe" "E:\IBM PA Models\Timewise\Scripts\RushTI\rushti.py" "E:\IBM PA Models\Timewise\Scripts\RushTI\Dim_Account_Add_New_[20241031092120]Task1.txt" 1 OPT 1
2024-10-31 09:27:33,629 - RushTI - INFO - RushTI starts. Parameters: ['E:\IBM PA Models\Timewise\Scripts\RushTI\rushti.py', 'E:\IBM PA Models\Timewise\Scripts\RushTI\Dim_Account_Add_New
[20241031092120]Task1.txt', '1', 'OPT', '1'].
2024-10-31 09:27:33,629 - RushTI - INFO - Function 'pre_process_file' skipped. Optional dependency 'chardet' not installed
E:\IBM PA Models\Timewise\Scripts\RushTI\rushti.py:623: DeprecationWarning: There is no current event loop
event_loop = asyncio.get_event_loop()
2024-10-31 09:27:34,855 - RushTI - INFO - Function 'pre_process_file' skipped. Optional dependency 'chardet' not installed
2024-10-31 09:27:34,886 - RushTI - INFO - Executing process: '}bedrock.cube.view.create' with parameters: {'pLogOutput': '0', 'pStrictErrorHandling': '0', 'pCube': '}ElementAttributes
}New_Account', 'pView': 'Src_SF', 'pFilter': '', 'pSuppressZero': '1', 'pSuppressConsol': '1', 'pSuppressRules': '1', 'pSuppressConsolStrings': '-1', 'pDimDelim': '&', 'pEleDelim': '+', 'pTemp': '0', 'pSubN': '0'} on instance: 'TIMEWISE'
2024-10-31 09:27:35,926 - RushTI - INFO - Execution successful: Process '}bedrock.cube.view.create' with parameters: {'pLogOutput': '0', 'pStrictErrorHandling': '0', 'pCube': '}ElementAttributes_}New_Account', 'pView': 'Src_SF', 'pFilter': '', 'pSuppressZero': '1', 'pSuppressConsol': '1', 'pSuppressRules': '1', 'pSuppressConsolStrings': '-1', 'pDimDelim': '&', 'pEleDelim': '+', 'pTemp': '0', 'pSubN': '0'} with 1 retries on instance: TIMEWISE. Elapsed time: 0:00:01.039958
2024-10-31 09:27:35,930 - RushTI - INFO - Executing process: '}atmosphere.run.tm1.to.salesforce' with parameters: {'pTm1Connection': 'timewise', 'pSalesforceConnection': 'salesforce-dev', 'pSalesforceObject': 'Account', 'pSourceCube': '}ElementAttributes_}New_Account', 'pSourceView': 'Src_SF', 'pSalesforceId': 'c2g__CODAExternalId__c', 'pRecordsOnRows': 'True', 'pCreateNewRecords': 'True', 'pElementAttributeSwap': '', 'pHeaderAttributeSwap': '', 'pRenameHeaders': '', 'pStaticColumns': '', 'pColumnOrder': '', 'pTransformationOrder': '', 'pSyncBackId': '{"}New_Account":"Id"}', 'pZeroAsValue': 'False'} on instance: 'TIMEWISE'
2024-10-31 09:27:58,755 - RushTI - INFO - Execution successful: Process '}atmosphere.run.tm1.to.salesforce' with parameters: {'pTm1Connection': 'timewise', 'pSalesforceConnection': 'salesforce-dev', 'pSalesforceObject': 'Account', 'pSourceCube': '}ElementAttributes_}New_Account', 'pSourceView': 'Src_SF', 'pSalesforceId': 'c2g__CODAExternalId__c', 'pRecordsOnRows': 'True', 'pCreateNewRecords': 'True', 'pElementAttributeSwap': '', 'pHeaderAttributeSwap': '', 'pRenameHeaders': '', 'pStaticColumns': '', 'pColumnOrder': '', 'pTransformationOrder': '', 'pSyncBackId': '{"}New_Account":"Id"}', 'pZeroAsValue': 'False'} with 1 retries on instance: TIMEWISE. Elapsed time: 0:00:22.823552
2024-10-31 09:27:58,771 - RushTI - INFO - Executing process: '}bedrock.server.wait' with parameters: {'pLogOutput': '0', 'pStrictErrorHandling': '0', 'pWaitSec': '60'} on instance: 'TIMEWISE'
2024-10-31 09:28:58,771 - RushTI - INFO - Execution successful: Process '}bedrock.server.wait' with parameters: {'pLogOutput': '0', 'pStrictErrorHandling': '0', 'pWaitSec': '60'} with 1 retries on instance: TIMEWISE. Elapsed time: 0:01:00.000291
2024-10-31 09:28:58,771 - RushTI - INFO - Executing process: '}atmosphere.run.salesforce.to.tm1.metadata' with parameters: {'pTm1Connection': 'timewise', 'pSalesforceConnection': 'salesforce-dev', 'pQuery': '"SELECT', '': '', '" pElementAttributeSwap': ''', , '" pHeaderAttributeSwap': '', '" pRenameHeaders': '', '" pStaticColumns': '', '" pColumnOrder': '', '" pUnwind': '', 'pTarget': 'Account_SF_New_Account_SFTest'} on instance: 'TIMEWISE'
2024-10-31 09:29:09,497 - RushTI - ERROR - Execution failed. Process: '}atmosphere.run.salesforce.to.tm1.metadata' with parameters: {'pTm1Connection': 'timewise', 'pSalesforceConnection': 'salesforce-dev', 'pQuery': '"SELECT', '': '', '" pElementAttributeSwap': '', '" pHeaderAttributeSwap': '', '" pRenameHeaders': '', '" pStaticColumns': '', '" pColumnOrder': '', '" pUnwind': '', 'pTarget': 'Account_SF_New_Account_SFTest'} with 2 retries and status: QuitCalled, on instance: 'TIMEWISE'. Elapsed time : 0:00:10.725914. Error file: None
2024-10-31 09:29:09,497 - RushTI - ERROR - RushTI ends. 1 fails out of 4 executions. Elapsed time: 0:01:35.867874. Ran with parameters: ['E:\IBM PA Models\Timewise\Scripts\RushTI\rushti.py', 'E:\IBM PA Models\Timewise\Scripts\RushTI\Dim_Account_Add_New_[20241031092120]Task1.txt', '1', 'OPT', '1']
RushTI ends. 1 fails out of 4 executions. Elapsed time: 0:01:35.867874. Ran with parameters: ['E:\IBM PA Models\Timewise\Scripts\RushTI\rushti.py', 'E:\IBM PA Models\Timewise\Scripts\RushTI\Dim_Account_Add_New
[20241031092120]_Task1.txt', '1', 'OPT', '1']

RushTI is doing something weird with the query we pass on. It is set in bold.

@nicolasbisurgi
Copy link
Contributor

Hi @SabrinaDC - the reason behind the error is because of the nested double quotes inside the pQuery param (next to the WHERE clause).
#87 has some changes that will address this, but you will need to change the task file using '' to escape double quotes, essentially try and replace this:
WHERE c2g__CODAExternalId__c = "20241031092120" "
With this:
WHERE c2g__CODAExternalId__c = \"20241031092120\""

That should give you a positive result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants