Skip to main content
Solved

exporting sql server non-spatial table info as xml file?


Forum|alt.badge.img

To get an xml file automatically we are currently storing all attribute table of sql server DB into a enterprise GDB in sql server, which is creating a trouble that everytime it is taking the primary key field as OBJECTID and changing the name of the field. So we want now to have the attribute table as it is in a non-spatial database, and want to read it's table name, field names and datatype into an xml file. But I cannot read the field names and data type as a list thus I can use it inside our own schema. Can anyone please guide me.?

Best answer by steveatsafe

I think you might have success using the SQL Server System Catalog... this would allow you to query (SQLCreator/Executer) your database for a specific schema and pull back tables, attributes and data types. Then you will have full control to push these to XML. I think this is what you are after. Check out Microsoft's post on the SQL Server System Catalog. Click the link called "How do I find the data types of the columns of a specified table?"

View original
Did this help you find an answer to your question?

4 replies

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • August 2, 2017
Hi @mjoarder_pln, thank you for your question!

 

Sharing a few more details will help the FME community help you. Please reply to this thread and provide additional details including:

 

  • The version of FME you are using, including build number and edition
  • A small sample of your data, or screenshots of the data in the FME Data Inspector
  • A description of your expected output, with screenshots if possible
  • Your FME workspace
  • Your FME translation log file
  • Any other information that may be useful to share

Forum|alt.badge.img
fmelizard wrote:
Hi @mjoarder_pln, thank you for your question!

 

Sharing a few more details will help the FME community help you. Please reply to this thread and provide additional details including:

 

  • The version of FME you are using, including build number and edition
  • A small sample of your data, or screenshots of the data in the FME Data Inspector
  • A description of your expected output, with screenshots if possible
  • Your FME workspace
  • Your FME translation log file
  • Any other information that may be useful to share
Hi @TiaAtSafe , thanks for your support. Please find the following answers regarding of your query:

 

 

  • 2016.1 16492FME 2016.1 release
  • Sql server non-spatial table sample:

  • expected xml format which will collect information Table name, column names and data type :methoden-example-schema-xml.xml
  • After generating this xml we will map it with another xml schema,
  • At this point I need help to extract information from sql table to xml

 

 


steveatsafe
Safer
Forum|alt.badge.img+12
  • Safer
  • Best Answer
  • August 3, 2017

I think you might have success using the SQL Server System Catalog... this would allow you to query (SQLCreator/Executer) your database for a specific schema and pull back tables, attributes and data types. Then you will have full control to push these to XML. I think this is what you are after. Check out Microsoft's post on the SQL Server System Catalog. Click the link called "How do I find the data types of the columns of a specified table?"


Forum|alt.badge.img
steveatsafe wrote:

I think you might have success using the SQL Server System Catalog... this would allow you to query (SQLCreator/Executer) your database for a specific schema and pull back tables, attributes and data types. Then you will have full control to push these to XML. I think this is what you are after. Check out Microsoft's post on the SQL Server System Catalog. Click the link called "How do I find the data types of the columns of a specified table?"

Thanks Steve. I have acheived already my xml schema with required attribute field and data types and other information using data query , ListBuilder, ListElementCount, XML Templeter and so on.

 

Thanks Safe Community for the fasinating support.

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings