'How to copy table from diferents collections in Wix?

I would like to copy PrivateMembersData to another collection from Google Cloud. I already do Google Cloud Integration but I need some answers because I'ḿ very new in javascript. Is it possible to copy?

What's the code should I use ?

Do I have to have same filters to do it ? Because is not possible to edit the filters name in Google Cloud Integration database from Wix.

I've tried this code in data.js :

import wixData from 'wix-data'; 


export function Members$PrivateMembersData_afterInsert(item, PrivateMembersData ) {
  let hookContext = PrivateMembersData;
 // see below

  // some changes to the received item

  return item;
}
export function testes_rapha$mytable_Insert(item, mytable);
      


export function Members$PrivateMembersData_afterUpdate(item2, PrivateMembersData ) {
  let hookContext = PrivateMembersData;
  

  // some changes to the received item

  return item2;
}
wixData.update("testes_rapha$mytable", item2)
    .then( (results) => {
        let item = results; //see item below
    } )
    .catch( (err) => {
        let errorMsg = err;
    } );


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source