tableau / wdc3

Web Data Connector (WDC), connecting to web application data from Tableau.
6 stars 0 forks source link

Nullable columns in WDC 3.0 #11

Open Tommo56700 opened 1 year ago

Tommo56700 commented 1 year ago

Currently I get an error if my WDC 3.0 sends a column containing nulls to Tableau. Tableau failed to create an extract:

image

I have reproduced the issue using the template solution and can provide code for fetcher & parser:

import { Fetcher, FetchOptions } from '@tableau/taco-toolkit/handlers'

export default class MyFetcher extends Fetcher {
  async *fetch({ handlerInput }: FetchOptions) {
    yield [{ date: new Date('2022-05-05') }, { date: null }]
  }
}
import {
  DataContainer,
  DataType,
  log,
  ParseOptions,
  Parser,
} from '@tableau/taco-toolkit/handlers'

export default class MyParser extends Parser {
  parse(fetcherResult: any, { dataContainer }: ParseOptions): DataContainer {
    const tableName = 'My Sample Data'
    log(`parsing started for '${tableName}'`)

    const containerBuilder = Parser.createContainerBuilder(dataContainer)
    const { isNew, tableBuilder } = containerBuilder.getTable(tableName)

    if (isNew) {
      tableBuilder.setId('mySampleData')
      tableBuilder.addColumnHeaders([
        {
          id: 'date',
          dataType: DataType.Date,
        },
      ])
    }

    tableBuilder.addRows(fetcherResult)

    return containerBuilder.getDataContainer()
  }
}

Is there a preferred approach for nullable columns in WDC 3.0?

linked community post: https://community.tableau.com/s/question/0D58b0000BOqbAbCQJ/how-to-send-nulls-in-wdc-30

caballo111 commented 1 year ago

Which version of the toolkit and tableau are you using?

angel-urena commented 1 year ago

Having this same issue when using taco-toolkit 1.2.0 and Tableau Desktop 2023.1. When using taco-toolkit 1.3.0 and Tableau Desktop 2023.2 then everything works fine.

Is there any workaround to get this to work using Tableau Desktop 2023.1? Is this a Tableau Desktop issue or a taco-toolkit issue? Using Tableau Desktop 2023.2 is not an option at this time since the latest available version of Tableau Server is 2023.1

patelnik0623 commented 1 year ago

Same here , i am facing the same issue for date conversion

Any updates ?

caballo111 commented 11 months ago

Tableau Desktop 2023.3 and Tableau Server 2023.3 have been released. Please try with taco toolkit 2.0.0 and Tableau Desktop/Server 2023.3 (I´ve not been able to give it a try by myself).

patelnik0623 commented 11 months ago

I installed tableau 2023.3 and ran with it but still getting “Null” values on primary table columns

@.***

Best Regards,

Nik Patel

From: caballo111 @.> Sent: Monday, November 13, 2023 3:11 PM To: tableau/wdc3 @.> Cc: Nikhilkumar Patel @.>; Comment @.> Subject: [External] Re: [tableau/wdc3] Nullable columns in WDC 3.0 (Issue #11)

Tableau Desktop 2023.3 and Tableau Server 2023.3 have been released. Please try with taco toolkit 2.0.0 and Tableau Desktop/Server 2023.3 (I´ve not been able to give it a try by myself).

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/tableau/wdc3/issues/11*issuecomment-1808988313__;Iw!!ECJmQIuuLqA!AvAlmIdmYCUXbxoi5Yvecv0cTIjr76Slt0yWlh7k8hIAc44Jkdheyki7-8Sg5Dp0JePloTuycnEJOtseVADq94a5Jg$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AUB62P4OPGOTAT27TEGZ5LTYEJ5EPAVCNFSM6AAAAAA3LE6PRSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBYHE4DQMZRGM__;!!ECJmQIuuLqA!AvAlmIdmYCUXbxoi5Yvecv0cTIjr76Slt0yWlh7k8hIAc44Jkdheyki7-8Sg5Dp0JePloTuycnEJOtseVAB7UNbp9A$. You are receiving this because you commented.Message ID: @.**@.>>

This message, including any attachments, may contain information which is confidential and/or exempt from disclosure under applicable law, and is intended only for the use of the designated recipient(s) listed above. Any unauthorized use or disclosure is strictly prohibited. If you are not the intended recipient, or have otherwise received this message by mistake, please notify the sender by replying via email, and destroy all copies of this message, including any attachments, without making a copy. Thank you for your cooperation.