Export dataset to SAS file (.sas7bdat)

Options
Eduard
Eduard Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 3 ✭✭✭

Hello,

Does anyone know a way to export a DSS dataset to a SAS table file (.sas7bdat extension)?

There is a SAS plugin to import this kind of file into a pandas dataframe into DSS, but nothing in the opposite direction...

There is a Python library that is supposed to do that (saspy), but I am not authorised to install new Python packages in my DSS Python environment.

Here is the project: GitHub - sassoftware/saspy: A Python interface module to the SAS System. It works with Linux, Windows, and mainframe SAS. It supports the sas_kernel project (a Jupyter Notebook kernel for SAS) or can be used on its own.

Has anyone tried it yet in DSS ?

Thanks in advance.


Operating system used: Windows 10

Best Answer

  • Jurre
    Jurre Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts, Registered, Dataiku DSS Developer, Neuron 2022 Posts: 114 ✭✭✭✭✭✭✭
    Answer ✓
    Options

    Hi @Pasavento
    ,

    Yes i tried it, and failed miserably. This sas-format is opaque, some have tried to deconstruct it with mixed and not very promising results. A possible workaround is using SPSS as that has a built-in exportfunctionality to sas7bdat-format.

    It should be noted that Sas has functions to import CSV and XLS(x) files but i'm not fully aware of it's inner workings and requirements.

    Cheers,

    Jurre

Answers

  • Eduard
    Eduard Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 3 ✭✭✭
    Options

    Thanks @Jurre

    Indeed, I think that the only solution is to import the dataset to SAS as a csv file.

    The idea was to save one step without having to go through a proc import, and just upload the dataset directly as SAS .sas7bdat table.

  • Jurre
    Jurre Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts, Registered, Dataiku DSS Developer, Neuron 2022 Posts: 114 ✭✭✭✭✭✭✭
    Options

    i think it's a big questionmark if that "saving one step" actually works out that way @Pasavento
    , possibly a lot of work needs to be done to get to this sas7bdat-format in the first place. I left that to SPSS, just exported from DSS and imported in SPSS, and immidiatly saved as sas7bdat. When familiar with Sas i would always rather use native importing functionality over exotic conversion-tools , but that's just my 2 cents.

Setup Info
    Tags
      Help me…