Retrieval of table names in particular IS

Hi All,

How to retrieve the table name which is referred in the JDBC Adapters service?

I have checked the adapter node.ndf file, could find the input & Output column names but not the table name.

My requirement is to list all the table names which is used in particular IS.

Kindly advice me how do achieve this.

You can easily find the table name from the input or output document

For eg. if you table is EMP_1 then your input will be insertEMP_1Input

Can you tell me why you have this kind of requirement? What is your business use case?

You can easily find the table name from the input or output document

For eg. if you table is EMP_1 then your input will be insertEMP_1Input

You can easily find the table name from the input or output document

For eg. if you table is EMP_1 then your input will be insertEMP_1Input

Hi Mahesh,

Thanks for your response.

I hope that the JDBC adapter input and output document creates an adapterservicenameInput & adapterservicenameInput.

Kindly tell me where I can find as you mentioned

My requirement is to delete a column(Name) from a Table “test” and this table is being used by many adapter service.

so I want to know the adapter names which refer to this table 'test", so that I can open the adapters and delete the column(Name).

Yes man, you are correct and my bad :frowning: as a best practice we create the name of adapter service with the table name.

But I have got the answer for you, in node.ndf file you will see a xml tag called

The tag value will be a base64 encoded string and you can use some online tool to base64 decode this and you will find the table name.

Make sure you don’t edit this file as this will corrupt your service, use it at your own risk.

Thanks Mahesh.

My bad as a project practice we use JDBC adapter service names related to the requirement.

I am getting my response by using online Base64 decoded and selected charset as ISO-8859-1, I can see the table name .

Now I am trying to develop JAVA Service/ Unix SCRIPT to fetch the table names from all the packages in IS.

Great and good luck. If you are success with the code design, please share it to me. Let me know if you have any questions.

Hi Charles,

I think it might be easier building a flow service for this as there are some helpful services in the WmART-Package for this (see Build-In-Services-Guide for details).

put.art:listRegisteredAdapters (to get the name of the JDBC-Adapter for the next step)
put.art.service:listAdapterServices (to get the existing services for a specific Adapter)

With the List of Services you can get the node.ndf from the File-System (using pub.file:* services from WmPublic) for decoding the IRTNODE-element and check if the service references the table you are looking for.

Remember that the Package name is not part of the service name so you might have to add it to the path additionally.
Transform the dots and colons in the service name to slashes for the path of the node.ndf.

IntegrationServer/[<instance-name for wM 9.6+ >/]packages//ns//node.ndf.

Note that relative pathes are relative to IntegrationServer/-directory.

Regards,
Holger

Charles,

Since you have more than one approaches suggested in this thread, choose what is best for you to implement this.

I always remember in one rule ‘Keep it simple’ :lol:

Duplicate message posted automatically due to website technical issue. Ignore it.

Duplicate message posted automatically due to website technical issue. Ignore it.

Thanks for your response Mahesh & Holger.

I have not yet decided and tried how to achieve this using Java Service or Unix script or flow service.

I will post the code once it is done.

Charles,

Please keep us posted on how custom JS code for this looks like once you tested it :slight_smile:

TIA,
RMG

Charles,

Please keep us posted on how custom JS code for this looks like once you tested it :slight_smile:

TIA,
RMG

Hi All,

Finally I come up with the java code.

I have attached the java file.

This service will return list of adapter services and table name it refers in a given package.

service Input & Output structure:

Input:
Package Name: // enter valid package name --service will validate the package name against installed packages
list in the IS

Output:
StatusMessage : //null if input package is valid else return error message
DocumentList:
packgeName : // input Package Name
AdapterName : //Adapter Service name
TableName : //table name to which the adapter service refer(display only for
select/insert/delete/update and null
for the custom and dynamic)
QueryType : //select/insert/delete/udpate/custom/dynamic/procedure

I tried my level best ,If anyone could find a better solution than this please post it.

getTableName.java (6.24 KB)

Thanks for sharing the utility with us. as long it works and results with what you wanted.

I also believe via WmArt services that can pull up metadata based on the jdbc connection did you check it?

HTH,
RMG

Hi RMG,

I couldn’t get your point.

It would be more helpful if you could elaborate it.

RMG is asking you to explore the services in WmART package.

I looked at your code its nice (but I did not test it yet) and if you have time and patience also you can refer 6-5_ADK_Users_Guide I hope it might help you.

RMG is asking you to explore the services in WmART package.

I looked at your code its nice (but I did not test it yet) and if you have time and patience also you can refer 6-5_ADK_Users_Guide I hope it might help you.