- 1 Minute to read
- Print
- DarkLight
- PDF
InjectPackage
- 1 Minute to read
- Print
- DarkLight
- PDF
Injects a shared data package that has been created using CreatePackage.
Key | Value(s) | Description |
---|---|---|
method | "InjectPackage" | Inject a shared data package into a target project. |
project | "CurrentProjectName" | Name of active project. |
path | "PackagePathAndFile" | Path and filename of *.zip file containing package information |
homePath | "TableDataPath" | Path to shared data. Note: This are loaded DataJet files (such as *.dat, *.uvl) If empty, datapath location will be read from package metadata json file. |
targetProject | "TargetProjectName" | Name of project into which the data will be injected. The project must already exist. |
includeProjectMetaData | "true" | |
sourceName | "SourceIdentifier" | |
sortMode | 0 | |
errorOnMissingDataFiles | true/false | Default = false. If true will raise an error if underlying data files are not found in the location specified by "homePath" |
name | "packagename" | |
pull | true/false | If true, will pull the package from the Storage hub |
templates[] | List of field templates to inject | |
tables[] | List of tables to inject | |
reports[] | List of reports to inject | |
stdReports[] | List of standardized reports to inject | |
renames[] | [ { "from": "sales", "to": "isales" } { "from": "...", "to": "..." } ] | From v6.02.09 Specifies aliases of injected table. |
Injected Packages are used to give multiple projects and/or servers/realms access to shared data. The Shared Data package can consist of tables, joins and reports.
Shared data cannot be altered by the target project, but can be used to derive new data which then belongs to the target project.
See CreatePackage for details on creating a package.
See Deep Dive - Sharing Data by Injection for an overview of the Shared Data process.
Helper
Right-click in the JSON panel to bring up the context menu and choose "Wizard":
The InjectPackage wizard will interrogate the Storage Hub for details of available packages. Selecting a package will populate the helper with details of the package contents.
Choosing "Apply" will add Selected options which will then be added to the method JSON.
Blank Method
{
"method": "InjectPackage",
"project": "",
"path": "",
"homePath": "",
"targetProject": "",
"includeProjectMetaData": false,
"sourceName": "",
"sortMode": 0,
"errorOnMissingDataFiles": false,
"name": "",
"pull": false,
"templates": [],
"tables": [],
"reports": [],
"stdreports": []
"renames":[]
}
Helper Generated Method
{
"method": "InjectPackage",
"project": "",
"homePath": "d:/datajet/dj-localhost/BikeData2",
"includeProjectMetaData": false,
"errorOnMissingDataFiles": false,
"name": "BikeData22023-10-13-12-53-15",
"pull": true,
"tables": [
"BikeTripData",
"BikePoints"
],
"reports": [
"BikePoint Overview",
"Category Profile - StartStation Name"
]
}
{
"method": "InjectPackage",
"project": "",
"homePath": "",
"includeProjectMetaData": true,
"errorOnMissingDataFiles": false,
"name": "Demo2023-11-09-16-18-17",
"pull": true,
"tables": [
"sales",
"customer"
],
"renames": [
{
"from": "sales",
"to": "isales"
}
{
"from": "customer",
"to": "icustomer"
}
]
}