Coginiti menu Coginiti menu

Coginiti 22.8 Release: Data Insert for BigQuery + More CoginitiScript Capabilities

Chris Crompton
August 30, 2022

Coginiti v22.8 is now available for download. This release adds several updates, including data insert for Google BigQuery and two major new CoginitiScript capabilities.

Data Insert for BigQuery

Coginiti’s Data Insert Wizard now supports BigQuery! Our template-driven, file-to-native-SQL tool empowers analysts to insert 100,000+ rows at a time into a new or existing table from an Excel or CSV file. Our Data Insert Wizard is also available for Snowflake, Redshift, DB2, Hive, Netezza, Postgres, and Greenplum connections.

Note that users on Snowflake or RedShift also have access to Coginiti’s Bulk Load Wizard which provides a tremendous performance boost by utilizing native platform functionality to route your data through your S3 or Azure Blob Storage account. Both wizards can be accessed through our Data Upload menu.

Major CoginitiScript Enhancements

Last month we added expressions, conditionals, and view publications to CoginitiScript. This release brings even more capabilities to CoginitiScript code blocks:

  • Loops
    Use loops to iterate over items in a collection.
#+for el : elements do
  {{ el }}
#+end

Loops are particularly useful for generating queries dynamically. Here we create a block which accepts list of dates. Then we will use  #+for  loop to iterate over input dates and generate a correspondent column expressions:

#+src sql scoreData(dates)
#+begin
  SELECT
    name,
    #+for d : dates separator "," do
      SUM(
        CASE 
          WHEN DATE_CMP(s.score_date, '{{ d }}') = 0 THEN s.score 
        END
      ) AS "{{ d }}"
    #+end
  FROM
    scores s
  GROUP BY
    name
  ORDER BY
    name;
#+end

Now we can get a report by simple calling our scoreData block and passing list of dates for which we want to get data.

SELECT * FROM {{ scoreData(dates=["2012-01-01", "2012-01-02"]) }};
  • Publications
    Our last release included the ability to publish data back to the data platform by setting a materialization strategy as either a table or a view. With this release we include a standard package to execute publications programmatically. To use the publication package, first import it at the head of your document. We then invoke the publication by calling publication.Run which accepts as arguments any named blocks with a publication strategy
#+import "std/publication"
#+import "your sales publication package"

{{ publication.Run(
  [sales.PubOne, sales.PubTwo]
)}}

All built-in packages will be part of the parent “std” package to eliminate collisions with user-defined packages.

See the full CoginitiScript language reference on our support site to learn more about this powerful capabilities for your SQL workflows.

Not yet a Coginiti user? Download your trial of Coginiti Pro, or schedule your Coginiti Premium demo to see collaborative intelligence in action.