--- title: "CopySourceTable" slug: "copysourcetable" updated: 2024-09-12T09:14:08Z published: 2024-09-12T09:14:08Z canonical: "docs.datajet.app/copysourcetable" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # CopySourceTable Copies a table from an existing project into the current project | Key | Value | Description | | --- | --- | --- | | method | CopySourceTable | | | project | "currentprojectname" | This project that will receive the copy of the table. | | sourceProject | "sourceprojectname" | The project containing the table to copy. **This must be different to "project" or an error will be raised.** **"Error copying Data"** | | table | "sourcetablename" | The table to copy | | targetName | "newtablename" | The name to give the new copy of the table | | moveFiles | true/false | Optional. If true, data files will be moved rather than copied. CAUTIONMoving files could result in a permanent loss of data if the move process is interrupted - be sure that source and target projects are protected from interruption. See LockCodeAquire for more information on locking a project from script. | | allFields | true/false | Default = true. If true, engineered fields will be included in the copy/move | | fields[] | [ "field1", "field2" ] | Optional. A list of shortfieldnames to copy/move | ```json { "method": "CopySourceTable", "project": "CurrentProject", "sourceProject": "ProjectToCopyFrom", "table": "TableToCopy", "targetName": "NewTableName", "allFields": true } ```