OpenLMIS Generating CSV file from entity

Hi. We have been working on ticket OLMIS-805: Ability to download a CSV file of the order, which tackles generating CSV file from entities and we are wondering how to handle situation with nested class in entity.

For example we would like to generate CSV file from the following class:

public class Role {

private String name;

private Right right;

}

The question is what should represents Right class in CSV file. At this moment we suggest saving only entity id field of nested class (in that case Right) and we would like to know your opinions.
Leszek

I would say that it is probably easier overall to put UUIDs in place of related fields, rather then serializing them to CSV, although maybe being able to control the behaviour would be beneficial for different use cases?

By the way, this doesn't directly affect the order export right? That file will be built primarily from order line items, am I correct?

Regards,

Paweł
···

On 11.07.2016 14:34, wrote:

lkukielka@soldevelo.com

      Hi. We have been working on ticket *            OLMIS-805: Ability to download a CSV file of the order*          , which tackles generating CSV file from entities and we are wondering how to handle situation with nested class in entity.
      For example we would like to generate CSV file from the following class:
      public class Role {
      private String name;
      private Right right;

}

      The question is what should represents Right class in CSV file. At this moment we suggest saving only *entity id* field of nested class (in that case Right) and we would like to know your opinions.

      Leszek

  You received this message because you are subscribed to the Google Groups "OpenLMIS Dev" group.

  To unsubscribe from this group and stop receiving emails from it, send an email to openlmis-dev+unsubscribe@googlegroups.com.

  To post to this group, send email to openlmis-dev@googlegroups.com.

  To view this discussion on the web visit [](https://groups.google.com/d/msgid/openlmis-dev/77b31608-4c98-4991-afbe-58e2414b2509%40googlegroups.com?utm_medium=email&utm_source=footer)      . For more options, visit .

https://groups.google.com/d/msgid/openlmis-dev/77b31608-4c98-4991-afbe-58e2414b2509%40googlegroups.com
https://groups.google.com/d/optout

I agree with Paweł’s second point: we don’t need to handle nested entities for Orders, correct? I see that the task language is looking for something generic, but I’m not sure we have the requirements to match up with this yet.

Which columns are planned for the Order CSV currently? The columns should ultimately be configured via the Order File (OLMIS-398).

···

On Tuesday, July 12, 2016 at 5:54:52 AM UTC-7, Paweł Gesek wrote:

I would say that it is probably easier overall to put UUIDs in place of related fields, rather then serializing them to CSV, although maybe being able to control the behaviour would be beneficial for different use cases?



By the way, this doesn't directly affect the order export right? That file will be built primarily from order line items, am I correct?



Regards,

Paweł
      Hi. We have been working on ticket *            OLMIS-805: Ability to download a CSV file of the order*          , which tackles generating CSV file from entities and we are wondering how to handle situation with nested class in entity.
      For example we would like to generate CSV file from the following class:
      public class Role {
      private String name;
      private Right right;

}

      The question is what should represents Right class in CSV file. At this moment we suggest saving only *entity id* field of nested class (in that case Right) and we would like to know your opinions.

      Leszek

After thinking about this a bit more:

  •      As I don’t believe the Story for configuring an Order file has started, this story should assume a default set of columns, which I believe v2 does as well.  Look at v2 for that list of columns.
    
  •      While a generic export of OpenLMIS entities would be useful, especially for staging Upload files, etc. it is currently not a requirement.   We’d want to think about how upload should work with these exports.
    
  •      If you already have some sort of generic export working, then go with the advice of using the UUID.  Again, to complete this, we’d have to think about how we want exports and data migration (between systems) to work
    
  •     Otherwise, isolate the code to work for exporting Order files only
    
···

I agree with Paweł’s second point: we don’t need to handle nested entities for Orders, correct? I see that the task language is looking for something generic, but I’m not sure we have the requirements to match up with this yet.

Which columns are planned for the Order CSV currently? The columns should ultimately be configured via the Order File (OLMIS-398).

On Tuesday, July 12, 2016 at 5:54:52 AM UTC-7, Paweł Gesek wrote:

I would say that it is probably easier overall to put UUIDs in place of related fields, rather then serializing them to CSV, although maybe being able to control the behaviour would be beneficial for different use cases?

By the way, this doesn’t directly affect the order export right? That file will be built primarily from order line items, am I correct?

Regards,

Paweł

Hi. We have been working on ticket OLMIS-805: Ability to download a CSV file of the order, which tackles generating CSV file from entities and we are wondering how to handle situation with nested class in entity.

For example we would like to generate CSV file from the following class:

public class Role {

private String name;

private Right right;

}

The question is what should represents Right class in CSV file. At this moment we suggest saving only entity id field of nested class (in that case Right) and we would like to know your opinions.

Leszek

Thanks Rich!

I've updated the story. We will take a look at v2 for the list of columns and use them for now.

Best regards,

Sebastian Brudzinski.
···

On 12.07.2016 18:56, Rich Magnuson wrote:

        After thinking about this a bit more:
  •                               As I don’t believe the Story for configuring an Order file has started, this story should assume a default set of columns, which I believe v2 does as well.  Look at v2 for that list of columns.
    
  •                               While a generic export of OpenLMIS entities would be useful, especially for staging Upload files, etc. it is currently not a requirement.   We’d want to think about how upload should work with these exports.
    
  •                               If you already have some sort of generic export working, then go with the advice of using the UUID.  Again, to complete this, we’d have to think about how we want exports and data migration (between systems) to work
    
  •                               Otherwise, isolate the code to work for exporting Order files only
    

Sent:
Tuesday, July 12, 2016 9:34 AM

        **To:** OpenLMIS Dev Re: [openlmis-dev] OpenLMIS Generating CSV file from entity
        I agree with Paweł's second point:  we don't need to handle nested entities for Orders, correct?  I see that the task language is looking for something generic, but I'm not sure we have the requirements to match up with this yet.
          Which columns are planned for the Order CSV currently?  The columns should ultimately be configured via the Order File (OLMIS-398).
          On Tuesday, July 12, 2016 at 5:54:52 AM UTC-7, Paweł Gesek wrote:
              I would say that it is probably easier overall to put UUIDs in place of related fields, rather then serializing them to CSV, although maybe being able to control the behaviour would be beneficial for different use cases?



              By the way, this doesn't directly affect the order export right? That file will be built primarily from order line items, am I correct?



              Regards,

              Paweł
                  Hi. We have been working on ticket *                        OLMIS-805: Ability to download a CSV file of the order*                      , which tackles generating CSV file from entities and we are wondering how to handle situation with nested class in entity.
                  For example we would like to generate CSV file from the following class:
                  public class Role {

private String name;

private Right right;

}

      The question is what should represents Right class in CSV file. At this moment we suggest saving only *entity id* field of nested class (in that case Right) and we would like to know your opinions.

      Leszek

  You received this message because you are subscribed to the Google Groups "OpenLMIS Dev" group.

  To unsubscribe from this group and stop receiving emails from it, send an email to openlmis-dev+unsubscribe@googlegroups.com.

  To post to this group, send email to openlmis-dev@googlegroups.com.

  To view this discussion on the web visit [](https://groups.google.com/d/msgid/openlmis-dev/BY2PR02MB028492F2DA46AF31C487A7893300%40BY2PR02MB028.namprd02.prod.outlook.com?utm_medium=email&utm_source=footer)      . For more options, visit .

openlmis-dev@googlegroups.com
Subject:

https://groups.google.com/d/msgid/openlmis-dev/BY2PR02MB028492F2DA46AF31C487A7893300%40BY2PR02MB028.namprd02.prod.outlook.com
https://groups.google.com/d/optout