Can not issue data manipulation statements with executeQuery()

Dataiker, Alpha Tester Posts: 535 Dataiker
edited July 2024 in Using Dataiku

I would like to create a table by SQL query:


CREATE TABLE `export_cellule_mysql`(
`site_id` varchar(127),
`latitude_WGS84` float(127),
`longitude_WGS84` float(127),
`lambet_X` varchar(127)
`dr` varchar(127))
;



I get an error:



Connection OK, but query failed: Can not issue data manipulation statements with executeQuery()

Answers

  • Dataiker, Dataiku DSS Core Designer, Registered, Moderator Posts: 753 Dataiker
    Hi,

    Let me summarize how interaction with SQL works in DSS. You have very different kinds of things:

    * The DATASET : it gets the rows of a SQL table, or the results of a SQL query, and makes them available as a dataset, ie, as a list of rows that you can see, process, export, visualize, ...

    * The RECIPE: the "SQL Query" recipe is used to create a new dataset (stored anywhere), as the results of a SQL Query. The target dataset can be either a SQL table, or just any kind of dataset you want.

    So, a DATASET is more like access on existing data, while one uses a RECIPE to create a new dataset from existing datasets, in a reproducible Flow.

    More information about the SQL datasets: http://doc.dataiku.com/dss/latest/connecting/sql_datasets.html
    More information about the SQL recipes: http://doc.dataiku.com/dss/latest/code_recipes/sql.html

    The most important concept is that in both the Dataset and Recipe, it only makes sense to make SELECTs. The whole idea is to generate rows.

    Now there is a third thing which is the SQL NOTEBOOK: it's simply an interactive SQL evaluation UI, where you can pass any SQL statement, and it gets executed.

    If you want to create a SQL table, you can do it directly in the Notebook, but it will not be specially known by DSS, and it won't help you perform operations on it.

    I would kindly suggest that you go through the tutorials that give more insight about how exactly datasets and recipes interact.

    Regards,

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.