abhishek_ajmera
05/08/2023, 11:59 AM2023-05-08T10:38:33.273344Z [info ] File "/home/ubuntu/meltano-v1/.meltano/loaders/target-bigquery/venv/lib/python3.10/site-packages/singer_sdk/helpers/_simpleeval.py", line 516, in _eval_name cmd_type=loader name=target-bigquery-ddb run_id=5cc9aaf0-5f69-4f0e-9954-d9666f5c8ce5 state_id=ddb stdio=stderr
2023-05-08T10:38:33.273544Z [info ] raise NameNotDefined(node.id, self.expr) cmd_type=loader name=target-bigquery-ddb run_id=5cc9aaf0-5f69-4f0e-9954-d9666f5c8ce5 state_id=ddb stdio=stderr
2023-05-08T10:38:33.273794Z [info ] singer_sdk.helpers._simpleeval.NameNotDefined: 'datetime' is not defined for expression 'datetime.datetime.strptime(str(createdAt), "%s")' cmd_type=loader name=target-bigquery-ddb run_id=5cc9aaf0-5f69-4f0e-9954-d9666f5c8ce5 state_id=ddb stdio=stderr
The docs for Stream Maps say that these are in-built functions, but I’m unable to call them using the syntax, am I doing something wrong?
created: datetime.datetime.from_timestamp(createdAt)
edgar_ramirez_mondragon
05/08/2023, 1:05 PMmeltano invoke target-bigquery --about --format json
to confirm the versions?abhishek_ajmera
05/08/2023, 1:07 PMabhishek_ajmera
05/08/2023, 2:13 PMedgar_ramirez_mondragon
05/08/2023, 2:49 PMmeltano install loader target-bigquery
? If that won't do it, maybe look at the pip_url
for the plugin in meltano.yml
, maybe the reference is outdated. Last option is to send a PR to the plugin repo to bump the sdk dependency.abhishek_ajmera
05/08/2023, 3:49 PMmeltano-map-transformer
utility. But now that the conversion is happening properly, it is still uploading it to bigquery as string
.
Just need to figure out a way to tell bigquery that the integer converted to a datetime, not a string. 🤔edgar_ramirez_mondragon
05/08/2023, 3:56 PMint()
edgar_ramirez_mondragon
05/08/2023, 5:34 PMcreated: int(datetime.datetime.from_timestamp(createdAt))
abhishek_ajmera
05/10/2023, 5:57 AMTypeError: int() argument must be a string, a bytes-like object or a real number, not 'datetime.datetime'
edgar_ramirez_mondragon
05/11/2023, 5:01 PMedgar_ramirez_mondragon
05/11/2023, 5:04 PM