Architecting, installing and maintaining your SAS environment

Batch Export Tool.How to save path to exported meta-object?

Reply
Regular Contributor
Posts: 160

Batch Export Tool.How to save path to exported meta-object?

Hi all,

Here is small description of problem:

I tried to export big flow with a lot of src/trg tables from one environment to another.

Folder structure same on both servers.

Initially I tried to do it usual way - create spk manually from DI studio,by check-in needed ETLs and related src/trg tables. But obviously all that process takes time and very easy accidentially lost something , due there are really a lot of Jobs and related tables to the flow.

So I find info that SAS provides "Batch Export Tool" that can automate similar process.

So what I already did:

I created small  macro with proc metadata, xmlmaps/xpath syntax, and that macro by flow name extract from metadata list of flows ETLs and targte source tables , soon will finish code that will also add pathes(folders) to that meta-objects.

Then I tried to make spk not manually ,but using simple batch export tool syntax , smth. like that:

ExportPackage

-profile "profName"

-package "c:\Documents and Settings\...\test.spk"

-objects "/sasproject/.../tablename1(Table)" "/sasproject/.../tablename2(Table)"

-types Table –excludeSubTypes

-log "c:\Documents and Settings\...\test_log.log"

And that command executes ok from command line, spk package creates normally and contains metadata for needed 2 tables(tablename1 and tablename2),BUT, after I tried import that package to be sure all is ok with it - I mentioned that folders structure lost, only root folder stais(sasproject).

It's not acceptbale for me, due target spk will contains a lot of tables/jobs from different meta pathes.

So I suppose should be some option that will "save" pathes to meatobjects in target spk packages. I tries subprop option, but it doesn't help...

Whould be appriciate for any help!

Thanks!

Regular Contributor
Posts: 160

Re: Batch Export Tool.How to save path to exported meta-object?

Small addition:
Partly solved the issue by adding folders ,except root, to the command line,like that:

ExportPackage

-profile "profName"

-package "c:\Documents and Settings\...\test.spk"

-types Folder -excludeSubTypes

-objects "/folder1(Folder)"

-objects "/folder1/folder2(Folder)"

...

"/sasproject/.../tablename2(Table)"

-objects "/sasproject/.../tablename1(Table)" "/sasproject/.../tablename2(Table)"

-types Table –excludeSubTypes

-log "c:\Documents and Settings\...\test_log.log"

Thats partly solved the issue but require from me to make additional code, that will parse fill path and put -object command for each folder connected to each job/table.Suppose should be some more clever solution, more quick and reliable. Maybe some option or smth. like that.

Thanks!

Ask a Question
Discussion stats
  • 1 reply
  • 401 views
  • 0 likes
  • 1 in conversation