Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Generate Customized a Data Model or Data Dictionary

Avatar

Avatar
Validate 1
Level 2
bhaskarc1289447
Level 2

Likes

5 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
bhaskarc1289447
Level 2

Likes

5 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
bhaskarc1289447
Level 2

11-08-2019

I am using this code to Generate a data model. But here you get the data model for the whole database. Is there any way to get a data model out of a selective tables from DB

var strXslt = "nl:dbdToOdt.xsl"

var strTemplate = installDirectory("datakit/nl/dbd-template.odt")

var strOutputFile = "database-description.odt"

var sql = xtk.sqlSchema.create()

sql.Generate() //-----------> tables from whole database is taken. Can it be customized to take only a few tables

var strDbXml = db = sql.toXML().toXMLString()

var strOdt = applyXsl(strXslt, strDbXml)

strOdt = strOdt.replace(/^<\?xml .*\?>\r?\n/, '\r\n')

var mbContent = new MemoryBuffer

mbContent.fromString(strOdt, "utf-8")

var zip = new ZipFile(strTemplate)

zip.open()

zip.setEntry("content.xml", mbContent)

zip.save(strOutputFile)

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 4
DimaKudryavtsev
Level 4

Likes

43 likes

Total Posts

44 posts

Correct Reply

10 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
DimaKudryavtsev
Level 4

Likes

43 likes

Total Posts

44 posts

Correct Reply

10 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
DimaKudryavtsev
Level 4

12-08-2019

HI

You can use

var schema = application.getSchema("cus:myTable")

To generate a single table schema. Is this is what you are looking for?

Answers (4)

Answers (4)

Avatar

Avatar
Boost 3
Employee
ChristopheProtat
Employee

Likes

3 likes

Total Posts

7 posts

Correct Reply

2 solutions
Top badges earned
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Boost 3
Employee
ChristopheProtat
Employee

Likes

3 likes

Total Posts

7 posts

Correct Reply

2 solutions
Top badges earned
Boost 3
Boost 1
Affirm 1
View profile
ChristopheProtat
Employee

11-10-2020

Hello,

You can try this tool. It makes it possible to select the schemas/tables you want and print in PDF part of your Data Model. 

https://github.com/ChrisRedfield126/ac-campaign-analyzer

Hope it will help

Avatar

Avatar
Contributor
MVP
Milan_Vucetic
MVP

Likes

161 likes

Total Posts

380 posts

Correct Reply

134 solutions
Top badges earned
Contributor
Springboard
Shape 1
Validate 25
Validate 10
View profile

Avatar
Contributor
MVP
Milan_Vucetic
MVP

Likes

161 likes

Total Posts

380 posts

Correct Reply

134 solutions
Top badges earned
Contributor
Springboard
Shape 1
Validate 25
Validate 10
View profile
Milan_Vucetic
MVP

12-08-2019

Hi,

the Generate() method does not receive any parameter.

Please, find the other methods which may be helpful for you on: sqlSchema

Regards,

Milan

Avatar

Avatar
Validate 1
Level 2
bhaskarc1289447
Level 2

Likes

5 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
bhaskarc1289447
Level 2

Likes

5 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
bhaskarc1289447
Level 2

19-11-2019

Thank you for your help.

i want to generate for 3-4 schemas in a single pdd. How to include those? Can the schemas be separated by comma? Also xtk.sqlSchema.create() generates WPPobject. Is it possible to generate WPPobject the for 3-4 schemas?

Avatar

Avatar
Validate 1
Level 2
bhaskarc1289447
Level 2

Likes

5 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
bhaskarc1289447
Level 2

Likes

5 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
bhaskarc1289447
Level 2

12-08-2019

Sorry, I used the wrong line as reference. i should have used this line

var sql = xtk.sqlSchema.create()

Here as we can see the whole of xtk.sqlSchema is used. Is there anyway that i can use my custom schemas to create the the object sql. I only need my custom schemas in that variable.Is it possible?

Is there any way I can pass the namespace in xtk.sqlSchema.create()?