BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Want to sponsor BOB? 
Want to sponsor BOB? (Opens a new window)  

General Notice: BOB is going to retire...please see details here.
General Notice: No events within the next 45 days.

Exporting Directly from Central Repository using AL_ENGINE

Goto page Previous  1, 2
 
Search this topic... | Search DI: Installation, Administration, and Connectivities... | Search Box
Register or Login to Post    Forum Index -> Data Integrator -> DI: Installation, Administration, and Connectivities  Previous TopicPrint TopicNext Topic
Author Message
gje306
Forum Member
Forum Member



Joined: 28 Jan 2013

Posts: 18



PostPosted: Tue Mar 19, 2013 11:49 am 
Post subject: Re: Exporting Directly from Central Repository using AL_ENGI

Have you seen cases where the differences are consequential?
Back to top
eganjp
Forum Addict
Forum Addict



Joined: 12 Sep 2007
ASUG Icon
Posts: 4281
Location: Denver Area


flag
PostPosted: Tue Mar 19, 2013 11:52 am 
Post subject: Re: Exporting Directly from Central Repository using AL_ENGI

gje306 wrote:
Have you seen cases where the differences are consequential?

Not yet. But I'm not looking at things with the same breadth as you are.

_________________
Jim Egan
ProKarma-an SAP Consulting Partner
Speaker at RMOUG Training Days 2013
Speaker at Sapphire Now 2013
Speaker at Business Objects User Conference 2013
-My ETL is faster than your database! - Advanced ETL performance tuning for Data Services
-Kill ETL bugs before they kill you!
My ETL blog

Latest Blog Posts
• 2014-04-17 Can Your ETL Make Your Reporting Faster?
• 2014-04-04 ProKarma Acquires Mantis Technology Group
• 2014-04-02 How to Create Charts in Webi (Part 2 of 2)
Back to top
dlaplant
Senior Member
Senior Member



Joined: 27 Mar 2006
ASUG Icon
Posts: 69
Location: Chicago


flag
PostPosted: Mon Sep 22, 2014 9:35 am 
Post subject: Re: Exporting Directly from Central Repository using AL_ENGI

Hi Manoj,

Can you please confirm that get latest from central to a local using the command line is still NOT available?

Thanks.

--
David

_________________
David La Plant
Integre Systems
Back to top
manoj_d
Forum Addict
Forum Addict



Joined: 01 Jan 2009

Posts: 2944



PostPosted: Tue Sep 23, 2014 12:30 pm 
Post subject: Re: Exporting Directly from Central Repository using AL_ENGI

No, this functionality is not yet available
Back to top
JeffPrenevost
Principal Member
Principal Member



Joined: 09 Oct 2010
ASUG Icon
Posts: 127
Location: SE Michigan, Ann Arbor area


flag
PostPosted: Wed Oct 18, 2017 4:12 am 
Post subject: Re: Exporting Directly from Central Repository using AL_ENGI

Like Jim, we've been exporting the latest version of objects out of central repos using al_engine. This is in support of automated CI testing. Just because something isn't supported doesn't mean it's not available. icon_wink.gif

Related question: has anybody figured out a way to export a specific table object via al_engine? I see, as of SP6, looking at al_engine /?, that you can delete a table object, but am wondering if the same syntax might work for exporting? Going to try...

_________________
Best wishes,
Jeff Prenevost
Sr. Implementation Architect, Guidewire Software
Back to top
eganjp
Forum Addict
Forum Addict



Joined: 12 Sep 2007
ASUG Icon
Posts: 4281
Location: Denver Area


flag
PostPosted: Wed Oct 18, 2017 8:40 am 
Post subject: Re: Exporting Directly from Central Repository using AL_ENGI

Jeff, it's been some time since I had to try new things from the command line. I do remember there being a problem with exporting tables but it was so long ago I don't remember the details. I'll be watching for your results.
_________________
Jim Egan
ProKarma-an SAP Consulting Partner
Speaker at RMOUG Training Days 2013
Speaker at Sapphire Now 2013
Speaker at Business Objects User Conference 2013
-My ETL is faster than your database! - Advanced ETL performance tuning for Data Services
-Kill ETL bugs before they kill you!
My ETL blog

Latest Blog Posts
• 2014-04-17 Can Your ETL Make Your Reporting Faster?
• 2014-04-04 ProKarma Acquires Mantis Technology Group
• 2014-04-02 How to Create Charts in Webi (Part 2 of 2)
Back to top
Soumi
Forum Member
Forum Member



Joined: 03 Jan 2018

Posts: 1



PostPosted: Wed Jan 03, 2018 2:00 am 
Post subject: Re: Exporting Directly from Central Repository using AL_ENGI

Hi,

Is it possible to export DS objects/jobs from central repository using al_engine command in BODS 4.2.?
If it is possible, then please share the script/command with me.

Thanks for your help!

Regards,
Soumi
DS Developer
Back to top
rajeshvr06
Senior Member
Senior Member



Joined: 05 Oct 2012

Posts: 44



PostPosted: Mon Jul 30, 2018 1:55 pm 
Post subject: Re: Exporting Directly from Central Repository using AL_ENGI

Hi Jim:

Exporting the objects from Central to local repo by using command line is available now?

I see from your post, its possible by exporting to atl file from central through al_egine and then use al_engine to import the atl file to local repo. But would like to know whether any direct approach is released?
Back to top
dopple
Principal Member
Principal Member



Joined: 19 Jun 2009

Posts: 198
Location: Edinburgh


flag
PostPosted: Mon Apr 15, 2019 11:58 am 
Post subject: Re: Exporting Directly from Central Repository using AL_ENGI

Hi folks.

I'm also looking at implementing a CI pipeline in order to automate promotion of data services objects.

We're on ds 4.2 sp 11. I'd be keen to know if others have successfully achieved this on this version, and if there are any things to look out for.

I.e. atl or xml? Reading the comments perhaps xml strips out cosmetic info so might not be the best format?

Thanks
Back to top
dopple
Principal Member
Principal Member



Joined: 19 Jun 2009

Posts: 198
Location: Edinburgh


flag
PostPosted: Tue Jun 04, 2019 1:53 am 
Post subject: Re: Exporting Directly from Central Repository using AL_ENGI

I've managed to get something that works reasonably well, but I was wondering if anyone who has done this, automated any kind of manual locking of the AL_USERS table in the target repository during a promotion?

We all know when you log into designer, if someone else tries to log into the same repo, they get an error saying that someone is already logged in. It seems like it would be a trivial operation to issue an update statement to first check if AL_USERS has any logged in users, and if anyone is logged in then exit the program, otherwise update AL_USERS to set that a user is logged in.

Has anyone else done this?
Back to top
vernong1992
Forum Member
Forum Member



Joined: 01 Mar 2017

Posts: 4



PostPosted: Thu Feb 13, 2020 6:15 pm 
Post subject: Re: Exporting Directly from Central Repository using AL_ENGI

Hi dopple,

Any chance you're willing to share the script or some tips to get started? I'd like to implement something similar.
Back to top
dopple
Principal Member
Principal Member



Joined: 19 Jun 2009

Posts: 198
Location: Edinburgh


flag
PostPosted: Tue Feb 18, 2020 7:14 am 
Post subject: Re: Exporting Directly from Central Repository using AL_ENGI

Can do, but this comes with all the caveats such as I can't offer support on this, and it's probably not supported by SAP either. Also, you can't get specific versions from the central repo, only the latest, and I can't promise this will work on the central repo in later releases. Also, we're not actively using this because I haven't had time to productionise it.

This is based on an oracle central and target repo. Also it's a script which is called from another script, but that other script isn't really going to be of any use due to the code being specific to our deployment request tool.

Note, the parameter ID is just a unique id for the deployment which is used to create file structures.

I added this to a python version of the code, which was much more complicated, but this bash version gives you the bones of what is needed.

For locking the repository, I did the following.

As a one off step, create a local user on your laptop (whatever you use designer on) and call it "autopromote" then log in as that user, and log into the target repo(s) using designer. This creates the required entry on al_users.

Then for each deployment.

Check the repo isn't already locked by someone else...

Code:
select name from al_users where login_cnt > 0 and name != 'autopromote'


If it is locked, exit the deployment. If not, lock it by executing

Code:
update al_users set login_cnt = 1 where name = 'autopromote'


Once finished, unlock

Code:
update al_users set login_cnt = 0 where name = 'autopromote'


Here's the main code

Code:

#!/usr/bin/bash

#
# promote.sh
#
# Author:  Graham MacLeod
# Created: May 2019
#
# This script exports atl files from the central repository and
# then imports them into the target repository using the al_engine
# program.
#
#
#

# Error if not called with correct arguments
if [ $# -lt 5 ]; then
    echo "Usage is..."
    echo ""
    echo "promote.sh id target type component include_dependencies log_file"
    echo ""
    echo "id is the migration ID"
    echo "target is the name of the target repository"
    echo "type is the type of component and is one of the following..."
    echo "    P : Project"
    echo "    J : Job"
    echo "    W : Work flow"
    echo "    D : Dataflow"
    echo "    T : Idoc"
    echo "    F : user defined File format"
    echo "    X : XML and DTD Message format"
    echo "    S : Datastore"
    echo "    C : Custom function"
    echo "    B : COBOL Copybook"
    echo "    E : Excel workbook"
    echo "    p : System Profile"
    echo "    v : Substitution Parameter Configuration"
    echo "    K : SDK transform Configuration"
    echo "component is the name of the component to be migrated"
    echo "include_dependencies is 'Y' if dependencies are to be included and 'N' if not"
    echo "log_file is the path of the log file. This is optional as one will be created if it doesn't exist"
    exit 1
fi

# Set input parameters
# Some validation of argument values carried out here

id=$1
target=$2
if [[ ! $3 =~ ^[PJWDTFXSCBEpvK]$ ]]; then
    echo "Component type argument must be in [PJWDTFXSCBEpvK]."
    exit 1
else
    type=$3
fi
component=$4
if [[ $5 =~ ^[Yy]$ ]]; then
    include_dependencies=DE
    echo_dependencies=" with dependents"
elif [[ $5 =~ ^[Nn]$ ]]; then
    include_dependencies=
    echo_dependencies=
else
    echo "include_dependents argument must be in [NnYy]."
    exit 1
fi

# Set directories and files

timestamp=$(date +%s)
filename=${target}.${type}.${include_dependencies}.${component}.export
working_directory=./promotions/${id}/${timestamp}/
trace_file=${working_directory}${filename}.trace
error_file=${working_directory}${filename}.err
output_file=${working_directory}${filename}.outp
atl_file=${working_directory}${filename}.atl

# Make the working directory (p flag creates parent directories if they don't exist)
mkdir -p ${working_directory}

# Set the log_file location if it hasn't been passed at runtime
if [[ -z "$6" ]]; then
    log_file=${working_directory}${timestamp}.log
else
    log_file=$6
fi

# Set environment variables (taken from existing DS shell scripts written by SAP)

LINK_DIR=/opt/sfw/BODS4/dataservices
export LINK_DIR
. ${LINK_DIR}/bin/al_env.sh

# Execute export

echo "Getting ${component}${echo_dependencies} from central respository" >> ${log_file}

echo "/opt/sfw/BODS4/dataservices/bin/al_engine -Xp@${type}@${atl_file}@${component}@${include_dependencies} -passphraseXXXXXXXXX -UCENTRAL_SCHEMA_USER -PPASSWORD_FOR_CENTRAL_SCHEMA -SDATABASE -NOracle -l${trace_file} -z${error_file} > ${output_file} 2>&1" >> ${log_file}

/opt/sfw/BODS4/dataservices/bin/al_engine -Xp@${type}@${atl_file}@${component}@${include_dependencies} -passphraseXXXXXXXXX -UCENTRAL_SCHEMA_USER -PPASSWORD_FOR_CENTRAL_SCHEMA -SDATABASE -NOracle -l${trace_file} -z${error_file} > ${output_file} 2>&1

# Validation
# This just validates that the file produced has content.
# If it's empty it is likely a result of an invalid combination of component name and type
if [ ! -s ${atl_file} ]; then
    echo "VALIDATION_ERROR: ATL file is empty: ${atl_file}" >> ${log_file}
    exit 1
fi

# Set files

filename=${type}.${include_dependencies}.${component}.import
trace_file=${working_directory}${filename}.trace
error_file=${working_directory}${filename}.err
output_file=${working_directory}${filename}.outp

# Execute import

echo "Importing ${component}${echo_dependencies} into ${target}" >> ${log_file}

/opt/sfw/BODS4/dataservices/bin/al_engine -f${atl_file}@NoUpgrade -ec -passphraseXXXXXXXXX -UTARGET_SCHEMA_USER -PPASSWORD_FOR_TARGET_SCHEMA -SDATABASE -NOracle -l${trace_file} -z${error_file} > ${output_file}





# Note for BoB users: This is actually carried out by a different controller script, but that contained code which was specific to the deployment request tool we use, and wouldn't be of use to anyone else, so the validation step has been copied and pasted here. Could probably do with some checks and catches to ensure anything which fails validation is flagged up.

#Validate post deployment
al_engine -XVJ@JOB_NAME -UUSERNAME -PPASSWORD -SDATABASE -Noracle -l${trace_file} -z${error_file} >> ${output_file} 2>&1
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Data Integrator -> DI: Installation, Administration, and Connectivities  Previous TopicPrint TopicNext Topic
Page 2 of 2 All times are GMT - 5 Hours
Goto page Previous  1, 2
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0451 seconds using 17 queries. (SQL 0.0155 Parse 0.0009 Other 0.0287)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo