Solved

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

  • 2 August 2017
  • 4 replies
  • 13 views

Badge

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.?

icon

Best answer by steveatsafe 3 August 2017, 17:50

View original

4 replies

Userlevel 4
Badge +13
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
Badge
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

 

 

Badge +11

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?"

Badge

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