This repository has been archived by the owner on Jun 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
IMPORT MODEL
ali1rathore edited this page Sep 10, 2018
·
1 revision
IMPORT MODEL [COMPONENTS] [ starschema | stats | snapindex | all ]
ON <fact-table> [FROM "/path/to/input/directory"]
Command to export a SNAP Model.
-
Components can be
starschema
,snapindex
,stats
orall
; default isall
- The user can optionally specify the root folder to export to; if not specified the
spark.sparklinedata.spmd.model.folder
setting controls the root folder location. - Model components are imported from
db/table
folder under the root folder. There should be a separate json file for each component. - When importing the
SNAPIndex
, if an Index exists it is dropped and recreated. - An
StarSchema
import is only allowed if there is no Index on the FactTable; in cases when there is an Index, import both theStarSchema
and theSNApIndex
in one import statement.
-- import starschema, snapindex components
import model starschema snapindex on lineitem_small from '/tmp';
-- import starschema
export model components starschema on lineitem_small to '/tmp'
-- import snapindex
import model snapindex on lineitem_small to '/tmp'