Telling Labkey to check a specific row (i.e. not the first row) for data headers

Installation Forum (Inactive)
Telling Labkey to check a specific row (i.e. not the first row) for data headers simon buckner  2017-02-21 11:40
Status: Closed
 
I searched around, but couldn't find an answer to this exact question.

We have a system that outputs excel files. The top of the file contains two columns of metadata, comprising six rows. There is a blank row directly below, and then on row 8, the data we wish to store begins.

Row 8 contains the headers we want in our data domain, so our data fields have been designed to match these. However, when I upload a file, Labkey appears to check the first row for header information (which only contains two non-blank columns). Thus, the file does not upload successfully.

Is there a way to tell Labkey to skip a few lines when searching for the headers? I saw on another post, someone suggested prepending the first seven lines with "#", but I am wondering if Labkey can be configured to ignore these automatically.

Thanks,

Simon
 
 
Jon (LabKey DevOps) responded:  2017-02-21 16:16
Hi Simon,

Where are you uploading this information into? A list? An assay? A study?

Are you doing this against a custom module you're developing or are you working with the existing modules in LabKey?

We have some special assays, like the Luminex ones, that read the headers off of the 12th line. But this was programmed into the code, specifically for Luminex XLS files.

Regards,

Jon
 
simon buckner responded:  2017-02-22 07:11
Hi Jon,

I am uploading via the Import Data option in a custom assay. I created it within a new project, so I'm not sure if that constitutes a custom module or not.

If I were to write a custom module, would I theoretically be able to specify the header line?

Thanks,

Simon
 
Jon (LabKey DevOps) responded:  2017-02-22 11:38
Hi Simon,

What you're referring to isn't a custom module, but rather using our existing assay modules instead.

A custom module is actual code development where you would build a module that would work within LabKey to do the extra work you're requiring or whatever special action/tasks that needs to be done.

https://www.labkey.org/home/Documentation/wiki-page.view?name=simpleModules

With regard to skipping lines, there isn't anything within LabKey that will automatically allow skipping of lines. However, you could write your own Transformation Script to perform this task within your Assay. Please take a look at the documentation link below. We provide an R script that does address this as an example. Transform scripts can be written in R, Perl, Python, or even Java.

https://www.labkey.org/home/Documentation/wiki-page.view?name=transformScriptR

Regards,

Jon