$ sfdx force:data:tree:export -q "SELECT Id, Name, (SELECT Id, FirstName, LastName FROM Contacts) FROM Account" -d data --plan -u mywork
Wrote 2 records to data/Accounts.json
Wrote 3 records to data/Contacts.json
Wrote 0 records to data/Account-Contact-plan.json
sfdx force:apex:execute -f scripts/apex/acccounts-contacts.apex -u mywork
Compiled successfully.
Executed successfully.
52.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO
Execute Anonymous: Account account= new Account(Name='サンプル');Execute Anonymous: insert account;Execute Anonymous:
Execute Anonymous: Contact[]contacts= new List<Contact>();Execute Anonymous:
Execute Anonymous: for(Integer i= 0; i < 10; i++){Execute Anonymous: Contact c= new Contact(FirstName='名' + i,
Execute Anonymous: LastName='姓' + i,
Execute Anonymous: AccountId= account.ID);Execute Anonymous: contacts.add(c);Execute Anonymous: }Execute Anonymous:
Execute Anonymous: insert contacts;21:08:54.37 (37424677)|USER_INFO|[EXTERNAL]|0050l000004pu84|test-1xxxxxxxxxxx@example.com|(GMT+09:00) 日本標準時 (Asia/Tokyo)|GMT+09:00
21:08:54.37 (37450095)|EXECUTION_STARTED
21:08:54.37 (37459435)|CODE_UNIT_STARTED|[EXTERNAL]|execute_anonymous_apex
21:08:54.37 (151092942)|CODE_UNIT_STARTED|[EXTERNAL]|DuplicateDetector
21:08:54.37 (191153995)|CODE_UNIT_FINISHED|DuplicateDetector
21:08:54.37 (403234928)|CODE_UNIT_STARTED|[EXTERNAL]|DuplicateDetector
21:08:54.37 (447494751)|CODE_UNIT_FINISHED|DuplicateDetector
21:08:54.37 (726402561)|CODE_UNIT_STARTED|[EXTERNAL]|DuplicateDetector
21:08:54.37 (747985994)|CODE_UNIT_FINISHED|DuplicateDetector
21:08:54.37 (748074889)|CODE_UNIT_STARTED|[EXTERNAL]|DuplicateDetector
21:08:54.37 (761584020)|CODE_UNIT_FINISHED|DuplicateDetector
21:08:54.761 (761741290)|CUMULATIVE_LIMIT_USAGE
21:08:54.761 (761741290)|LIMIT_USAGE_FOR_NS|(default)| Number of SOQL queries: 0 out of 100 Number of query rows: 0 out of 50000 Number of SOSL queries: 0 out of 20 Number of DML statements: 2 out of 150 Number of Publish Immediate DML: 0 out of 150 Number of DML rows: 11 out of 10000 Maximum CPU time: 0 out of 10000 Maximum heap size: 0 out of 6000000 Number of callouts: 0 out of 100 Number of Email Invocations: 0 out of 10 Number of future calls: 0 out of 50 Number of queueable jobs added to the queue: 0 out of 50 Number of Mobile Apex push calls: 0 out of 1021:08:54.761 (761741290)|CUMULATIVE_LIMIT_USAGE_END
21:08:54.37 (761782664)|CODE_UNIT_FINISHED|execute_anonymous_apex
21:08:54.37 (761792508)|EXECUTION_FINISHED