Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
DataDeploy - querry tables
msa02
Hi All,
Can data deploy be used for extracting the data, meaning you could write a .cfg file that could querry a table and extract data from the database.
Find more posts tagged with
Comments
Migrateduser
DataDeploy does not have that capability.
Migrateduser
No, however TeamSite ships with the perl DBI modules installed. It's pretty trivial to write a script that would make the queries and write out DCRs (which I'm guessing, is your goal).
Do a perldoc DBI to look at the docs and see if that gets you off on the right track. If not, come back and ask your question in a little more detail. There's a pretty good chance that someone has done something similar.
Cheers
Rob
rob@bagpipe.com
msa02
thanks! I thought there might be another way, because our production environment doesn't have DBI installed.
Thanks again,
msa02
Migrateduser
Perhaps I don't understand your architecture or I don't understand what you are trying to accomplish. Is your goal to generate some sort of dynamic content on your production server? If so, does it need to be real time, updated when the data is updated, or what?
Migrateduser
Yes., you can. You can write a config file with <database> as the source and <xml-formatted-data> as the destination.
For example:
.....
.....
<source>
<database db=....
user=....
....>
<db-producer-query>
<![CDATA[
select PATH
from default_TEAMSITE_METADATA__main_pradeeps_WORKAREA_ddtestwa
where IW_STATE != 'NotPresent'
and LaunchDate between {d '2001-06-01'} AND {d '2001-06-06'}
UNION ALL
select PATH
from default_TEAMSITE_METADATA__main_pradeeps_STAGING T1
where
not exists (
select 1
from default_TEAMSITE_METADATA__main_pradeeps_WORKAREA_ddtestwa T2
where T2.PATH = T1.PATH
)
and LaunchDate between {d '2001-06-01'} AND {d '2001-06-06'}
order by 1
]]>
</db-producer-query>
</database>
....
<destinations>
<xml-formatted-data file="C:/temp/mydboutput.xml"/>
</destinations>
The output file will be in xml format. YOu can specify field mapping for element name to be used for each column value., if needed.