GoodData | Developer Network
 

Loading Data into GoodData Using Command Line

Step-by-step tutorial is below the screencast.


Preparation - find some data, create a GoodData account

  • In following examples, we will use a comma-separated file for sake of simplicity. If you have other data formats, or wish to connect directly into the database, we have connectors into data integration tools that offer direct database access.

    If you want to analyze data from your internal database, most vendors feature export tools ( MySQL, Oracle, MS SQL etc. ). We also have a JDBC connector that can attach to your database directly. See this example to learn more.

  • If you don't have an account with GoodData, go to www.gooddata.com and register for one.
  • Step 1 - install GoodData CL

    Follow the quick installation readme.

     

    Step 2 - describe your data

    Run the gdi.sh script, generate a XML config file describing your data. The example uses a file in your GoodData CL Framework. You might use your own data file (make sure the first row contains headers):

    ./bin/gdi.sh -e "GenerateCsvConfig(csvHeaderFile='examples/quotes/quotes.csv',configFile='config.xml');"

    This command generated a sample XML config file. Data types of your columns are random. Read the XML config documentation to edit this file and describe your data. See our examples for typical basic usage.

    Step 3 - setup your project

    Save this file as create.txt and run with gdi.sh script:

    ./bin/gdi.sh -u <username> -p <password> create.txt

    Now you can log into your project and visually verify your created attributes, facts and data model (in the Data page).

     

    Step 4 - load your data

    Save another file as load.txt and run with gdi.sh script:

    ./bin/gdi.sh -u <username> -p <password> load.txt

    Next steps

     

    Automatic data load

    Since step 4 is fully automatic, you can easily place that command into a shell script (or Windows batch script) and run periodically.

    Learn more

    • See the other examples included with GoodData CL.
    • Read the full GoodData CL documentation for more advanced options like data snapshotting, custom connectors etc.
    • Or dive even deeper and read our full MAQL DDL documentation for creating custom data models.