Skip to main content

Hi all,

question please regarding "SOURCE_DATASET" value.

My custom reader has its own dataset parameter, SB_DATASET.

I need to sync SB_DATASET with SOURCE_DATASET: SOURCE_DATASET <-> SB_DATASET 

The following way doesn't work:

SOURCE_SETTINGS
...
DEFAULT_VALUE SB_DATASET $(SB_DATASET)
GUI TEXT SB_DATASET Dataset Name:
...
END_SOURCE_SETTINGS
SOURCE_DATASET $(SB_DATASET)

when  IFMEReader::open(const char* datasetName,
                           const IFMEStringArray& parameters) - is called  - the datasetName is "."

The opposite doesn't work as well:

SOURCE_SETTINGS
...
DEFAULT_VALUE SB_DATASET $(SOURCE_DATASET)
GUI TEXT SB_DATASET Dataset Name:
--------OR-------->
DEFAULT_VALUE SB_DATASET $ SourceDataset]
GUI TEXT SB_DATASET Dataset Name:
...
END_SOURCE_SETTINGS
SOURCE_DATASET \"$ISourceDataset]\"

After creating the reader - SB_DATASET has "$RSourceDataset]" or empty value.

Any ideas how to sync these two variables will be very appreciated.

Thanks!

Hello @egorbaykovnn

 

 

I will take a look at this today, and try to have a response back to you for your workday!

 

Hello @egorbaykovnn,

Here is some preliminary information I was able to find: it appears we use a single $(Dataset) parameter to avoid the parsing situation. The GUI label that is associated with that dataset can be different based upon the format. For the SQL Server non-spatial format, the dataset parameter is similar to the database name. An example can be seen in the mssql_connection metafile, located at <FME>\\metafile\\mssql_connection.fmi.

 

 

I apologize if this doesn't really answer your question, I will do some more investigation tomorrow to try and get a concrete method/answer to you. I hope this is enough to get your started.

 


 

Hello @egorbaykovnn,

Here is some preliminary information I was able to find: it appears we use a single $(Dataset) parameter to avoid the parsing situation. The GUI label that is associated with that dataset can be different based upon the format. For the SQL Server non-spatial format, the dataset parameter is similar to the database name. An example can be seen in the mssql_connection metafile, located at <FME>\metafile\mssql_connection.fmi.

 

 

I apologize if this doesn't really answer your question, I will do some more investigation tomorrow to try and get a concrete method/answer to you. I hope this is enough to get your started. 

 

@trentatsafe, thanks for this info.

 

yeah - it doesn't help too much.

 

I see you are able to pass connection info to the settings dialog using

 

GUI NAMED_DB_CONNECTION_ENCODED NAMED_CONNECTION FAMILY:Microsoft<space>SQL<space>Server Connection
I'm not sure but this NAMED_DB_CONNECTION_ENCODED  seems to be connection specific UI. I didn't find any info about in metafile help(http://docs.safe.com/fme/html/FME_Metafiles/index.html). Based on other examples - the second parameter requires to be a connection type..just guessing.

 

Anyway it seems this is different then what I need.

 

 

I also tried $(Dataset) - doesn't work for me as well.

 

 

I think I could simplify my task: I need  to display the dataset value from main dialog (like "Generate workspace" dialog) into Parameters dialog.

 

I.e. no needs to edit the dataset on Parameters dialog; just display its actual value could be enough.

 

 

Thanks!

Reply