cancel
Showing results for 
Search instead for 
Did you mean: 

Custom data access extension: how to set field type?

tamasholics
Explorer
0 Kudos

Hi,

We are trying to create our own data access extension. Everything works fine, data is read and displayed in Lumira, but we have a problem. We cannot find a way to explicitly set the field type (number or string etc.), so Lumira takes care of this. However, unfortunately in many cases Lumira's guess is incorrect.

Do you maybe know a way how we could explicitly define the data type of the fields using the data access SDK?

Thanks and best regards,

Tamás

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Tamas,

You can do so by adding a "type" to each of the columns in your metadata that you return from your implementation of IDAEMetadataAcquisitionJob. As per my knowledge, these are the types supported:

  • boolean
  • integer
  • biginteger
  • number
  • date
  • datetime
  • time
  • string

So, an example column in your "columns" array of your metadata could be:

{

     "name": "MyNumberColumn",

     "id": "id1",

     "type": "number",

     "analyticalType": "measure"

}

Hope this helps!

Regards,

Maaz

tamasholics
Explorer
0 Kudos

Hi Maaz,

Thanks for your help.

We are developing our extension in .NET (C#) and we seem to be unable to find any way to stream our metadata to Lumira. The example you've sent seem to be valid for the JAVA SDK that does not exist in .NET. Do you maybe have an idea how we can make a workaround? Can we send the same information to Lumira without the JAVA SDK?

Best regards,

Tamás

0 Kudos

Hi Tamas,

I'm unaware of a .NET SDK for DA extensions. How do you plan to use this extension in Lumira?

Regards,

Maaz

tamasholics
Explorer
0 Kudos

Hi Maaz,

We are actually not using a .NET SDK, but we are implementing the data access connection based on the guidelines of Lumira: http://help.sap.com/businessobject/product_guides/vi01/en/lum_120_dae_dev_en.pdf

So based on this we developed a console application that streams data to Lumira through the standard output (console). The DS info and data are provided between keywords, for example DS info is provided like this:


static void streamDSInfoBlock(string csv_separator, string csv_date_format,

  string csv_number_grouping, string csv_number_decimal,

  bool csv_first_row_has_column_names, string fileName)

  {

  StringBuilder sb = new StringBuilder();

  sb.AppendLine("beginDSInfo");

  sb.Append("fileName;");

  sb.Append(fileName);

  sb.AppendLine(";true");

  sb.Append("csv_separator;");

  sb.Append(csv_separator);

  sb.AppendLine(";true");

  sb.Append("csv_date_format;");

  sb.Append(csv_date_format);

  sb.AppendLine(";true");

  sb.Append("csv_number_grouping;");

  sb.Append(csv_number_grouping);

  sb.AppendLine(";true");

  sb.Append("csv_number_decimal;");

  sb.Append(csv_number_decimal);

  sb.AppendLine(";true");

  sb.Append("csv_first_row_has_column_names;");

  sb.Append(csv_first_row_has_column_names ? "true" : "false");

  sb.AppendLine(";true");

  sb.Append("endDSInfo");

  Console.WriteLine(sb.ToString());

}

It would be great if we could also provide field-level metadata too (field types, measure/dimension etc.).

Best regards,

Tamás

0 Kudos

Hi Tamas,

Now I understand. You are using the v1 SDK that allows you to upload executables to Lumira. Unfortunately, I don't know of any way that you can stream metadata in the v1 SDK.

I believe it is recommended to use the v2 SDK. You could take a look at the documentation for the same at http://help.sap.com/businessobject/product_guides/vi01/en/lum_128_dae_dev_en.pdf. I would encourage you to look at sections 2.1.1 and 2.1.2 which talk about the features that come with the different SDKs.

Specifically, to address your concern, this line in 2.1.1 which talks about v2 SDK features, might interest you: "Metadata provision for detailed column definitions"

Regards,

Maaz

Answers (0)