Skip to content

pdunn/bq_fake_data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#How to use Packaging that wraps the faker.js file in a way that is compatible with BigQuery as a javascript UDF.

CREATE TEMP FUNCTION entity()
RETURNS STRUCT<name String, age INT64>
LANGUAGE js 
AS """
  var f = getFaker()
  this.val = f.name.findName();
  this.age = (f.random.number() % 78) + 2
  return this;
"""
OPTIONS (
    library=["gs:https://path/to/bq_fake.js"]
);

SELECT entity().*
FROM `bigquery-public-data.wise_all_sky_data_release.mep_wise`
LIMIT 10

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published